llj
2025-08-07 5f984a9b0e665ba9a9325da738220121a58e8d76
业务类
1个文件已修改
79 ■■■■ 已修改文件
DAL/基础资料/其他基础资料/ClsGy_MatePrice_Ctl.cs 79 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/»ù´¡×ÊÁÏ/ÆäËû»ù´¡×ÊÁÏ/ClsGy_MatePrice_Ctl.cs
@@ -20,7 +20,7 @@
        {
            try
            {
                oCn.RunProc(" Update Gy_MatePriceSup set HChecker='',HCheckDate=null Where HItemID=" + lngBillKey.ToString());
                oCn.RunProc(" Update Gy_MatePrice set HCheckEmp='',HCheckTime=null Where HItemID=" + lngBillKey.ToString());
                sReturn = "";
                return true;
            }
@@ -113,45 +113,44 @@
        }
        //显示单据
        //public bool ShowBill(Int64 lngBillKey, ref string sReturn)
        //{
        //    try
        //    {
        //        //查询主表
        //        DataSet DsSub = new DataSet();
        //        DsSub = oCn.RunProcReturn("Select * from Gy_MatePriceSup Where HitemID=" + lngBillKey.ToString(), "Gy_MatePriceSup");
        //        DetailColl.Clear();//清空
        //        for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
        //        {
        //            Model.ClsGy_MatePriceSup_Model oSub = new Model.ClsGy_MatePriceSup_Model();
        //            oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"].ToString());
        //            oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"].ToString());
        //            oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"].ToString());
        //            oSub.HRelationID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HRelationID"].ToString());
        //            oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
        //            oSub.HBeginQty = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HBeginQty"].ToString());
        //            oSub.HEndQty = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HEndQty"].ToString());
        //            oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"].ToString());
        //            oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"].ToString());
        //            oSub.HCurID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HCurID"].ToString());
        //            oSub.HType = DsSub.Tables[0].Rows[i]["HType"].ToString();
        //            oSub.HMaker = DsSub.Tables[0].Rows[i]["HMaker"].ToString();
        //            oSub.HMakeDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HMakeDate"]);
        //            oSub.HBeginDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HBeginDate"]);
        //            oSub.HEndDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEndDate"]);
        //            oSub.HChecker = DsSub.Tables[0].Rows[i]["HChecker"].ToString().Trim();
        //            oSub.HCheckDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HCheckDate"]);
        //            DetailColl.Add(oSub);
        //        }
        //        sReturn = "显示单据成功!";
        //        return true;
        //    }
        //    catch (Exception e)
        //    {
        //        sReturn = e.Message;
        //        return false;
        //    }
        //}
        public bool ShowBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //查询主表
                DataSet DsSub = new DataSet();
                DsSub = oCn.RunProcReturn("Select * from Gy_MaterPrice Where HitemID=" + lngBillKey.ToString(), "Gy_MaterPrice");
                DetailColl.Clear();//清空
                for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
                {
                    Model.ClsGy_MatePrice_Model oSub = new Model.ClsGy_MatePrice_Model();
                    oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"].ToString());
                    oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
                    oSub.HWHID = DBUtility.ClsPub.isInt(DsSub.Tables[0].Rows[i]["HWHID"].ToString());
                    oSub.HSupID = DBUtility.ClsPub.isInt(DsSub.Tables[0].Rows[i]["HSupID"].ToString());
                    oSub.HPrice = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPrice"].ToString());
                    oSub.HCusID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HCusID"].ToString());
                    oSub.HStopflag = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HStopflag"].ToString());
                    oSub.HUseFlag = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HUseFlag"].ToString());
                    oSub.HMakeEmp = DsSub.Tables[0].Rows[i]["HMakeEmp"].ToString();
                    oSub.HCheckEmp = DsSub.Tables[0].Rows[i]["HCheckEmp"].ToString();
                    oSub.HStopEmp = DsSub.Tables[0].Rows[i]["HStopEmp"].ToString();
                    oSub.HModifyEmp = DsSub.Tables[0].Rows[i]["HModifyEmp"].ToString();
                    oSub.HMakeTime = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HMakeTime"].ToString());
                    oSub.HCheckTime = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCheckTime"].ToString());
                    oSub.HModifyTime = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HModifyTime"].ToString());
                    oSub.HStopTime = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HStopTime"].ToString());
                    DetailColl.Add(oSub);
                }
                sReturn = "显示单据成功!";
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                return false;
            }
        }
        //批改单据
        public bool BatchModifyBill(Int64 lngBillKey, double sPrice, ref string sReturn)