From eb22fa59bce6c5e1a90f2e6613847c4b9e5e4df3 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期三, 28 十二月 2022 08:48:27 +0800 Subject: [PATCH] 点检记录单信息维护 --- WorkM/流转卡管理/MES_StationInBill.cs | 68 +++++++++++++++++++++++++++++++--- 1 files changed, 62 insertions(+), 6 deletions(-) diff --git "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationInBill.cs" "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationInBill.cs" index fcf9aa1..e30106e 100644 --- "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationInBill.cs" +++ "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationInBill.cs" @@ -17,6 +17,7 @@ { InitializeComponent(); } + public DBUtility.frmBillQueryCondition_New frmCondition; public string ModName = "3790"; public string ModCaption = "杩涚珯鎺ユ敹鍗�"; public const string ModRightName = "MES_StationInBill"; @@ -138,6 +139,7 @@ //鍙栨秷鎸夐挳 private void cmdCancel_Click(object sender, EventArgs e) { + ClsPub.SaveGridView(grdSub, Name+"grdSub", ClsPub.AppPath);//璁剧疆鍒楀 this.Close(); } //鎺т欢浣嶇疆 @@ -151,6 +153,7 @@ //绐椾綋鍔犺浇 private void Sc_StationInBill_Load(object sender, EventArgs e) { + frmCondition = new DBUtility.frmBillQueryCondition_New(); //鎵撳嵃鍒濆鍖� this.Text = ModCaption; this.lblCaption.Text = ModCaption; @@ -178,7 +181,7 @@ private void Sc_StationInBill_FormClosing(object sender, FormClosingEventArgs e) { BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew; - //DBUtility.Xt_BaseBillFun.SaveGrid(grdMain, this.Name); + //DBUtility.Xt_BaseBillFun.SaveGrid(grdSub, this.Name); DBUtility.Xt_BaseBillFun.SaveGrid(grdCardList, this.Name + "grdCardList"); } //鏂板鍗曟嵁 @@ -414,7 +417,8 @@ txtHProcNo.Enabled = false; //鍔犺浇 閰嶄欢缁戝畾娓呭崟 - + HInterID = BillOld.omodel.HInterID; + DisplaySub(); @@ -1510,13 +1514,20 @@ DataSet Dsplay; Dsplay = oCn.RunProcReturn("exec h_p_MES_StationInBillSub_BindDisplay " + HInterID.ToString() + " ", "h_p_MES_StationInBillSub_BindDisplay"); //鍐欏叆淇℃伅 - if (Dsplay == null || Dsplay.Tables[0].Rows.Count == 0) + if (Dsplay == null ) { MessageBox.Show("鍒锋柊澶辫触锛�"); return; } + else if(Dsplay.Tables[0].Rows.Count == 0) + { + return; + } else { + //閲婃斁鍐荤粨 + DBUtility.Xt_BaseBillFun.CancelFrozenCol(grdSub); + // grdSub.DataSource = Dsplay.Tables[0].DefaultView; //璁剧疆鍚堣鍒� //string sTotalCol = ""; @@ -1526,9 +1537,15 @@ //oSumGrid.BuildTotalCols(sT); // //鍐荤粨 - int FrCol = 0; - string s = "鏄�"; - DBUtility.Xt_BaseBillFun.DisplayGrid(grdSub, this.Name + "grdSub", s, FrCol); + int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text); + string s = frmCondition.cmbHComplete.Text; + DBUtility.Xt_BaseBillFun.DisplayGrid(grdSub, this.Name, s, FrCol); + //鐢荤嚎 + GraphLine(); + //鍐荤粨 + //int FrCol = 0; + //string s = "鏄�"; + //DBUtility.Xt_BaseBillFun.DisplayGrid(grdSub, this.Name + "grdSub", s, FrCol); } } catch (Exception e) @@ -1536,5 +1553,44 @@ MessageBox.Show(e.Message + "DisplaySub"); } } + private void GraphLine() + { + int MainIDCol = 0; + int SubIDCol = 0; + string s = frmCondition.cmbHComplete.Text; + long n = 0; + DBUtility.Xt_BaseBillFun.GraphLine(grdSub, MainIDCol, SubIDCol, s, ref n); + } + + private void cmdDelLine_Click(object sender, EventArgs e) + { + try + { + //鏍规嵁閫夋嫨鐨勬潯褰㈢爜 鏉ュ垹闄� + if (grdSub.CurrentRow == null) + return; + string sBarCode = DBUtility.ClsPub.isStrNull(grdSub.Rows[grdSub.CurrentRow.Index].Cells[Fun_GetCol("鏉″舰鐮�")].Value); + SQLHelper.ClsCN oCn = new ClsCN(); + oCn.RunProc(" delete from Sc_StationInBillSub_BindBarCodeTemp " + + "Where HInterID = "+ HInterID.ToString() +" and HBarCode = '"+ sBarCode + "'"); + DisplaySub(); + } + catch (Exception e1) + { + MessageBox.Show("鍒犻櫎琛屽け璐ワ紒"+e1.Message); + } + + } + + private void cmdHbclk_Click(object sender, EventArgs e) + { + //淇濆瓨鍒楀 + DBUtility.Xt_BaseBillFun.SaveGrid(grdSub, this.Name); + } + + private void cmdHmrlk_Click(object sender, EventArgs e) + { + DBUtility.Xt_BaseBillFun.DefaultGridView(grdSub, this.Name); + } } } \ No newline at end of file -- Gitblit v1.9.1