From 573f8cd63ce36c531ec019c8c5e20353090f12ac Mon Sep 17 00:00:00 2001 From: yxj <yxj@hz-kingdee.com> Date: 星期四, 07 三月 2024 10:17:30 +0800 Subject: [PATCH] 工序工价模块,保存修改时增加写入新字段,选择物料时根据组织过滤物料信息 --- BLL/系统公用CLS/ClsBaseSelect_InterFace.cs | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 110 insertions(+), 0 deletions(-) diff --git "a/BLL/\347\263\273\347\273\237\345\205\254\347\224\250CLS/ClsBaseSelect_InterFace.cs" "b/BLL/\347\263\273\347\273\237\345\205\254\347\224\250CLS/ClsBaseSelect_InterFace.cs" index a2dbc1e..598669b 100644 --- "a/BLL/\347\263\273\347\273\237\345\205\254\347\224\250CLS/ClsBaseSelect_InterFace.cs" +++ "b/BLL/\347\263\273\347\273\237\345\205\254\347\224\250CLS/ClsBaseSelect_InterFace.cs" @@ -583,6 +583,32 @@ } } + //閫夋嫨鎺ュ彛绫荤墿鏂� 鏍规嵁缁勭粐杩囨护 + /// <summary> + /// 閫夋嫨鎺ュ彛绫荤墿鏂� 鏍规嵁缁勭粐杩囨护 + /// </summary> + /// <param name="txt"></param> + public static void SetTextByMater(string sWhere, TextBox txt, TextBox txt2, TextBox txt3) + { + DAL.ClsIF_Material_View oMater = new DAL.ClsIF_Material_View(); + if (oMater.RefreshViewForBig(sWhere)) + { + if (oMater.GetInfoByID(oMater.oModel.HItemID)) + { + txt.Text = oMater.omodel.HNumber; + txt.Tag = oMater.omodel.HItemID.ToString(); + txt2.Text = oMater.omodel.HName; + txt3.Text = oMater.omodel.HModel; + } + } + else + { + txt.Text = ""; + txt2.Text = ""; + txt3.Text = ""; + } + } + //閫夋嫨鎺ュ彛绫荤墿鏂� /// <summary> /// 閫夋嫨鎺ュ彛绫荤墿鏂� @@ -682,6 +708,54 @@ grdMain.Rows[i].Cells[HUnitNameCol].Value = ""; } } + + //鎺ュ彛绫荤墿鏂�-缃戞牸 鏍规嵁缁勭粐杩囨护 + /// <summary> + /// 鎺ュ彛绫荤墿鏂�-缃戞牸 鏍规嵁缁勭粐杩囨护 + /// </summary> + /// <param name="grdMain"></param> + /// <param name="i"></param> + /// <param name="HMaterIDCol"></param> + /// <param name="HMaterNumberCol"></param> + /// <param name="HMaterNameCol"></param> + public static void SetGridByMater(DataGridView grdMain, string sWhere, int i, int HMaterIDCol, int HMaterNumberCol, int HMaterNameCol, int HMaterModelCol, int HUnitIDCol, int HUnitNumberCol, int HUnitNameCol) + { + DAL.ClsIF_Material_View oMater = new DAL.ClsIF_Material_View(); + if (oMater.RefreshViewForBig(sWhere)) + { + if (oMater.GetInfoByID(oMater.oModel.HItemID)) + { + grdMain.Rows[i].Cells[HMaterIDCol].Value = oMater.omodel.HItemID.ToString(); + grdMain.Rows[i].Cells[HMaterNumberCol].Value = oMater.omodel.HNumber; + grdMain.Rows[i].Cells[HMaterNameCol].Value = oMater.omodel.HName; + grdMain.Rows[i].Cells[HMaterModelCol].Value = oMater.omodel.HModel; + grdMain.Rows[i].Cells[HUnitIDCol].Value = oMater.omodel.HUnitID; + grdMain.Rows[i].Cells[HUnitNumberCol].Value = oMater.omodel.HUnitNumber; + grdMain.Rows[i].Cells[HUnitNameCol].Value = oMater.omodel.HUnitName; + } + else + { + grdMain.Rows[i].Cells[HMaterIDCol].Value = "0"; + grdMain.Rows[i].Cells[HMaterNumberCol].Value = ""; + grdMain.Rows[i].Cells[HMaterNameCol].Value = ""; + grdMain.Rows[i].Cells[HMaterModelCol].Value = ""; + grdMain.Rows[i].Cells[HUnitIDCol].Value = "0"; + grdMain.Rows[i].Cells[HUnitNumberCol].Value = ""; + grdMain.Rows[i].Cells[HUnitNameCol].Value = ""; + } + } + else + { + grdMain.Rows[i].Cells[HMaterIDCol].Value = "0"; + grdMain.Rows[i].Cells[HMaterNumberCol].Value = ""; + grdMain.Rows[i].Cells[HMaterNameCol].Value = ""; + grdMain.Rows[i].Cells[HMaterModelCol].Value = ""; + grdMain.Rows[i].Cells[HUnitIDCol].Value = "0"; + grdMain.Rows[i].Cells[HUnitNumberCol].Value = ""; + grdMain.Rows[i].Cells[HUnitNameCol].Value = ""; + } + } + //鎺ュ彛绫荤墿鏂�-缃戞牸 /// <summary> /// 鎺ュ彛绫荤墿鏂�-缃戞牸 @@ -1054,5 +1128,41 @@ } } + //鎺ュ彛绫诲伐浣滀腑蹇�-缃戞牸 + /// <summary> + /// 鎺ュ彛绫诲伐浣滀腑蹇�-缃戞牸 + /// </summary> + /// <param name="grdMain"></param> + /// <param name="i"></param> + /// <param name="HWorkCenterIDCol"></param> + /// <param name="HWorkCenterNumberCol"></param> + /// <param name="HWorkCenterNameCol"></param> + public static void SetGridByWorkCenter(DataGridView grdMain, int i, int HWorkCenterIDCol, int HWorkCenterNumberCol, int HWorkCenterNameCol) + { + + DAL.ClsIF_WorkCenter_View oWorkCenter = new DAL.ClsIF_WorkCenter_View(); + if (oWorkCenter.RefreshView()) + { + if (oWorkCenter.GetInfoByID(oWorkCenter.oModel.HItemID)) + { + grdMain.Rows[i].Cells[HWorkCenterIDCol].Value = oWorkCenter.omodel.HItemID.ToString(); + grdMain.Rows[i].Cells[HWorkCenterNumberCol].Value = oWorkCenter.omodel.HNumber; + grdMain.Rows[i].Cells[HWorkCenterNameCol].Value = oWorkCenter.omodel.HName; + } + else + { + grdMain.Rows[i].Cells[HWorkCenterIDCol].Value = "0"; + grdMain.Rows[i].Cells[HWorkCenterNumberCol].Value = ""; + grdMain.Rows[i].Cells[HWorkCenterNameCol].Value = ""; + } + } + else + { + grdMain.Rows[i].Cells[HWorkCenterIDCol].Value = "0"; + grdMain.Rows[i].Cells[HWorkCenterNumberCol].Value = ""; + grdMain.Rows[i].Cells[HWorkCenterNameCol].Value = ""; + } + } + } } -- Gitblit v1.9.1