using System;
|
using System.Collections.Generic;
|
using System.Text;
|
using System.Data;
|
|
namespace DAL
|
{
|
public class ClsIF_ProcPrice_Ctl : DBUtility.ClsGy_Base_Ctl
|
{
|
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
|
//原代码 用于 替换子项目
|
public string HOldNumber;
|
public List<Model.ClsIF_ProcPrice_Model> DetailColl = new List<Model.ClsIF_ProcPrice_Model>();
|
|
|
//根据物料和工序返回工价 //
|
public double LoadProcPrice(Int64 sMaterID, Int64 sProcID, Int64 sWorkCenterID)
|
{
|
double sPrice = 0;
|
try
|
{
|
//查询主表
|
DataSet DsSub = new DataSet();
|
DsSub = oCn.RunProcReturn("Select top 1 * from h_v_IF_ProcPrice Where HMaterID=" + sMaterID.ToString() + " and HProcID=" + sProcID.ToString() + " and HWorkCenterID=" + sWorkCenterID.ToString(), "h_v_IF_ProcPrice");
|
if (DsSub == null || DsSub.Tables[0].Rows.Count == 0)
|
{
|
return 0;
|
}
|
|
sPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[0]["HPrice"]);
|
|
return sPrice;
|
}
|
catch (Exception e)
|
{
|
return 0;
|
}
|
}
|
|
//构造函数
|
public ClsIF_ProcPrice_Ctl()
|
{
|
MvarItemKey = "IF_ProcPrice";
|
MvarReportTitle = "工序工价资料";
|
}
|
}
|
}
|