DAL/源单/Cls_S_Xt_BaseBill.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WarM/条码打印/Gy_BarCodeBill.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WarM/条码打印/Gy_BarCodeBill.designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
DAL/Ô´µ¥/Cls_S_Xt_BaseBill.cs
@@ -25,7 +25,8 @@ public string sOrderSql2 = ""; public string sKeyCol2 = ""; public string sShowItemSql2 = ""; public DAL.frmHlpBillList oFrm = new DAL.frmHlpBillList(); public frmHlpBillList oFrm; //public DAL.frmHlpBillList oFrm = new DAL.frmHlpBillList(); public List<DBUtility.BillSelect> oBillSelectColl = new List<DBUtility.BillSelect>(); public List<DBUtility.BillSelect_A3> oBillSelectColl2 = new List<DBUtility.BillSelect_A3>(); // @@ -53,6 +54,7 @@ tSQL = sWhere + sCondtion + sOrderSql; try { oFrm = new frmHlpBillList(); oFrm.sPrimaryCol = sKeyCol; oFrm.Text = mvarReportTitle; oFrm.lblCaption.Text = mvarReportTitle; @@ -112,6 +114,7 @@ tSQL = sWhere + sCondtion2 + sOrderSql2; try { oFrm = new frmHlpBillList(); oFrm.sPrimaryCol = sKeyCol2; oFrm.Text = mvarReportTitle2; oFrm.lblCaption.Text = mvarReportTitle2; @@ -168,6 +171,7 @@ tSQL = sWhere + sCondtion2 + sOrderSql2; try { oFrm = new frmHlpBillList(); oFrm.sPrimaryCol = sKeyCol2; oFrm.Text = mvarReportTitle2; oFrm.lblCaption.Text = mvarReportTitle2; @@ -257,6 +261,7 @@ tSQL = sWhere + sCondtion + sOrderSql; try { oFrm = new frmHlpBillList(); oFrm.sPrimaryCol = sKeyCol; oFrm.Text = mvarReportTitle; oFrm.lblCaption.Text = mvarReportTitle; @@ -295,6 +300,56 @@ return true; } //æ ¹æ®æºåå· æ¨¡ææ¥è¯¢æ°æ® /// <summary> /// æ¾ç¤ºæ°æ® /// </summary> /// <param name="sWhere">主SQL</param> /// <param name="sCondtion">è¿æ»¤æ¡ä»¶</param> /// <param name="sOrderSql">æåºæ¡ä»¶</param> /// <param name="sKeyCol">ä¸å¯éå¤å</param> /// <returns></returns> public virtual bool RefreshBySourceBillNo(string sWhere) { string sErr = ""; string tSQL; ClsCN oCn = new ClsCN(); tSQL = " select hmainid,hsubid,åæ®å· from " + ViewName + sWhere + sOrderSql; try { DataSet ds = oCn.RunProcReturn(tSQL, ViewName, ref DBUtility.ClsPub.sExeReturnInfo); if (ds == null || ds.Tables[0].Rows.Count == 0) { return false; } //è¿åæ°æ®å°éåä¸ oBillSelectColl.Clear(); //å¾ªç¯ éä¸è¡ for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { BillSelect oSelect = new BillSelect(); oSelect.BillNo = ClsPub.isStrNull(ds.Tables[0].Rows[i]["åæ®å·"]); oSelect.BillMainID = ClsPub.isLong(ds.Tables[0].Rows[i]["hmainid"]); oSelect.BillSubID = ClsPub.isLong(ds.Tables[0].Rows[i]["hsubid"]); oSelect.BillTitle = mvarReportTitle; oSelect.BillType = mvarItemKey; oBillSelectColl.Add(oSelect); } // if (oBillSelectColl.Count > 0) return true; else return false; } catch (Exception e) { sErr = e.Message; } return true; } } } WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill.cs
@@ -1832,7 +1832,14 @@ //grdMain.Rows[i].Cells[HSourceNumberCol].Value = oTable.Rows[0]["ç产线代ç "].ToString(); grdMain.Rows[i].Cells[HSourceNameCol].Value = oTable.Rows[0]["ç产线"].ToString(); grdMain.Rows[i].Cells[HEndDateCol].Value = oTable.Rows[0]["计åå®å·¥æ¥æ"].ToString(); grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["æå°å è£ æ°"].ToString(); if (cmbHBarCodeType.Text == "æ¹æ¬¡æ¡ç " && CampanyName == "åæ¥ç§æ") { grdMain.Rows[i].Cells[HMinQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["æªçææ¡ç æ°é"]); } else { grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["æå°å è£ æ°"].ToString(); } //-- //设置å¯ç¼è¾å string sAllowCol = HQtyCol.ToString() + @@ -1882,7 +1889,14 @@ grdMain.Rows[i].Cells[HUnitNameCol].Value = oTable.Rows[0]["计éåä½"].ToString(); grdMain.Rows[i].Cells[HRemarkCol].Value = oTable.Rows[0]["夿³¨"].ToString(); grdMain.Rows[i].Cells[HMTONoCol].Value = oTable.Rows[0]["计åè·è¸ªå·"].ToString(); grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["æå°å è£ æ°"].ToString(); if (cmbHBarCodeType.Text == "æ¹æ¬¡æ¡ç " && CampanyName == "åæ¥ç§æ") { grdMain.Rows[i].Cells[HMinQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["æªçææ¡ç æ°é"]); } else { grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["æå°å è£ æ°"].ToString(); } grdMain.Rows[i].Cells[HMakerCol].Value = ClsPub.CurUserName; if (cmbSourceBillType.Text.Trim() == "æ¶æéç¥å"|| cmbSourceBillType.Text.Trim() == "éè´è®¢å" || cmbSourceBillType.Text.Trim() == "å§å¤è®¢å" || cmbSourceBillType.Text.Trim() == "éè´å ¥åºå") @@ -2505,6 +2519,106 @@ } } private void txtHSourceBillNo_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Return)//åè½¦å¸¦åºæºåä¿¡æ¯ { long sHOrgID = -1; DAL.ClsGy_ORGANIZATIONS_View oClsGy_ORGANIZATIONS_View = new DAL.ClsGy_ORGANIZATIONS_View(); if (oClsGy_ORGANIZATIONS_View.GetInfoByName(cmbHOrgID.Text)) { sHOrgID = oClsGy_ORGANIZATIONS_View.omodel.HItemID; } if (txtHSourceBillNo.Text.Length < 4) { MessageBox.Show("请è¾å ¥4ä½ä»¥ä¸æ°æ®ï¼"); return; } //æ ¹æ®æºåç±»å åæºåå· è·åä¿¡æ¯ if (cmbSourceBillType.Text.Trim() == "ç产订å") { DAL.Cls_S_IFCLD_ICMOList oIFCLD_ICMOList = new DAL.Cls_S_IFCLD_ICMOList(); if (oIFCLD_ICMOList.RefreshBySourceBillNo(" Where åæ®å· like '%" + txtHSourceBillNo.Text + "' and HOrgID =" + sHOrgID.ToString())) //éæ©åå { FillSelectData(oIFCLD_ICMOList.oBillSelectColl); txtHSourceBillNo.Text = ""; } else { MessageBox.Show("æªæ¥è¯¢å°ä»»å¡æ°æ®ï¼è¯·ç¡®è®¤æéç»ç»ãæºåç±»å䏿ºååå·æ¯å¦æ£ç¡®ï¼"); return; } } else if (cmbSourceBillType.Text.Trim() == "çäº§æ±æ¥å") { DAL.Cls_S_IF_ICMOReportBillList oIF_ICMOReportBillList = new DAL.Cls_S_IF_ICMOReportBillList(); if (oIF_ICMOReportBillList.RefreshBySourceBillNo(" Where åæ®å· like '%" + txtHSourceBillNo.Text + "' ")) //éæ©åå { FillSelectData(oIF_ICMOReportBillList.oBillSelectColl); txtHSourceBillNo.Text = ""; } else { MessageBox.Show("æªæ¥è¯¢å°ä»»å¡æ°æ®ï¼è¯·ç¡®è®¤æéç»ç»ãæºåç±»å䏿ºååå·æ¯å¦æ£ç¡®ï¼"); return; } } else if (cmbSourceBillType.Text.Trim() == "æ¶æéç¥å") { DAL.Cls_S_IF_POInStockBillList oIF_POInStockBillList = new DAL.Cls_S_IF_POInStockBillList(); if (oIF_POInStockBillList.RefreshBySourceBillNo(" Where åæ®å· like '%" + txtHSourceBillNo.Text + "' ")) //éæ©åå { FillSelectData(oIF_POInStockBillList.oBillSelectColl); txtHSourceBillNo.Text = ""; } else { MessageBox.Show("æªæ¥è¯¢å°ä»»å¡æ°æ®ï¼è¯·ç¡®è®¤æéç»ç»ãæºåç±»å䏿ºååå·æ¯å¦æ£ç¡®ï¼"); return; } } else if (cmbSourceBillType.Text.Trim() == "éè´è®¢å") { DAL.Cls_S_IF_POOrderBillList oIF_POOrderBillList = new DAL.Cls_S_IF_POOrderBillList(); if (oIF_POOrderBillList.RefreshBySourceBillNo(" Where åæ®å· like '%" + txtHSourceBillNo.Text + "' ")) //éæ©åå { FillSelectData(oIF_POOrderBillList.oBillSelectColl); txtHSourceBillNo.Text = ""; } else { MessageBox.Show("æªæ¥è¯¢å°ä»»å¡æ°æ®ï¼è¯·ç¡®è®¤æéç»ç»ãæºåç±»å䏿ºååå·æ¯å¦æ£ç¡®ï¼"); return; } } else if (cmbSourceBillType.Text.Trim() == "å§å¤è®¢å") { DAL.Cls_S_IF_EntrustOrderBillList oIF_EntrustOrderBillList = new DAL.Cls_S_IF_EntrustOrderBillList(); if (oIF_EntrustOrderBillList.RefreshBySourceBillNo(" Where åæ®å· like '%" + txtHSourceBillNo.Text + "' ")) //éæ©åå { FillSelectData(oIF_EntrustOrderBillList.oBillSelectColl); txtHSourceBillNo.Text = ""; } else { MessageBox.Show("æªæ¥è¯¢å°ä»»å¡æ°æ®ï¼è¯·ç¡®è®¤æéç»ç»ãæºåç±»å䏿ºååå·æ¯å¦æ£ç¡®ï¼"); return; } } else { MessageBox.Show("æéæºåç±»åï¼ä¸æ¯ææ¤åè½ï¼"); return; } } } } } WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill.designer.cs
@@ -51,6 +51,8 @@ this.tb = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); this.gl = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); this.BatchNo = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.tc = new System.Windows.Forms.ToolStripButton(); this.lblCaption = new System.Windows.Forms.Label(); @@ -67,7 +69,7 @@ this.label1 = new System.Windows.Forms.Label(); this.cmdHEmpID = new System.Windows.Forms.Button(); this.cmdSourceBillNo = new System.Windows.Forms.Button(); this.textBox2 = new System.Windows.Forms.TextBox(); this.txtHSourceBillNo = new System.Windows.Forms.TextBox(); this.label14 = new System.Windows.Forms.Label(); this.cmbSourceBillType = new System.Windows.Forms.ComboBox(); this.label10 = new System.Windows.Forms.Label(); @@ -104,8 +106,6 @@ this.grdSub = new System.Windows.Forms.DataGridView(); this.tabPage3 = new System.Windows.Forms.TabPage(); this.grdList = new System.Windows.Forms.DataGridView(); this.BatchNo = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); this.Tool.SuspendLayout(); this.P1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pic1)).BeginInit(); @@ -374,6 +374,25 @@ this.gl.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.gl.Click += new System.EventHandler(this.gl_Click); // // toolStripSeparator7 // this.toolStripSeparator7.Name = "toolStripSeparator7"; this.toolStripSeparator7.Size = new System.Drawing.Size(6, 50); // // BatchNo // this.BatchNo.AutoSize = false; this.BatchNo.Image = ((System.Drawing.Image)(resources.GetObject("BatchNo.Image"))); this.BatchNo.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; this.BatchNo.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.BatchNo.ImageTransparentColor = System.Drawing.Color.White; this.BatchNo.Name = "BatchNo"; this.BatchNo.Size = new System.Drawing.Size(36, 47); this.BatchNo.Text = "æ¹æ¬¡"; this.BatchNo.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.BatchNo.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.BatchNo.Click += new System.EventHandler(this.BatchNo_Click); // // toolStripSeparator3 // this.toolStripSeparator3.Name = "toolStripSeparator3"; @@ -438,7 +457,7 @@ this.gbUp.Controls.Add(this.label1); this.gbUp.Controls.Add(this.cmdHEmpID); this.gbUp.Controls.Add(this.cmdSourceBillNo); this.gbUp.Controls.Add(this.textBox2); this.gbUp.Controls.Add(this.txtHSourceBillNo); this.gbUp.Controls.Add(this.label14); this.gbUp.Controls.Add(this.cmbSourceBillType); this.gbUp.Controls.Add(this.label10); @@ -547,13 +566,14 @@ this.cmdSourceBillNo.UseVisualStyleBackColor = true; this.cmdSourceBillNo.Click += new System.EventHandler(this.cmdSourceBillNo_Click); // // textBox2 // txtHSourceBillNo // this.textBox2.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.textBox2.Location = new System.Drawing.Point(394, 46); this.textBox2.Name = "textBox2"; this.textBox2.Size = new System.Drawing.Size(166, 21); this.textBox2.TabIndex = 41; this.txtHSourceBillNo.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.txtHSourceBillNo.Location = new System.Drawing.Point(394, 46); this.txtHSourceBillNo.Name = "txtHSourceBillNo"; this.txtHSourceBillNo.Size = new System.Drawing.Size(166, 21); this.txtHSourceBillNo.TabIndex = 41; this.txtHSourceBillNo.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtHSourceBillNo_KeyPress); // // label14 // @@ -965,25 +985,6 @@ this.grdList.Size = new System.Drawing.Size(929, 288); this.grdList.TabIndex = 46; // // BatchNo // this.BatchNo.AutoSize = false; this.BatchNo.Image = ((System.Drawing.Image)(resources.GetObject("BatchNo.Image"))); this.BatchNo.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; this.BatchNo.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.BatchNo.ImageTransparentColor = System.Drawing.Color.White; this.BatchNo.Name = "BatchNo"; this.BatchNo.Size = new System.Drawing.Size(36, 47); this.BatchNo.Text = "æ¹æ¬¡"; this.BatchNo.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.BatchNo.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.BatchNo.Click += new System.EventHandler(this.BatchNo_Click); // // toolStripSeparator7 // this.toolStripSeparator7.Name = "toolStripSeparator7"; this.toolStripSeparator7.Size = new System.Drawing.Size(6, 50); // // Gy_BarCodeBill // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -1068,7 +1069,7 @@ private System.Windows.Forms.Label label10; private System.Windows.Forms.ComboBox cmbSourceBillType; private System.Windows.Forms.Button cmdSourceBillNo; private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.TextBox txtHSourceBillNo; private System.Windows.Forms.Label label14; private System.Windows.Forms.ToolStripButton tc; private System.Windows.Forms.ToolStripSeparator toolStripSeparator12;