From 355dec078e44db52fc6c6371debbe44898e6f1f1 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期四, 07 三月 2024 11:22:42 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- 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