| | |
| | | { |
| | | txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | txtHMiniQty.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["æ åè£
ç®±"].Value); |
| | | //txtHMaterID.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["ç©æç¼ç "].Value); |
| | | txtHMaterModel.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["è§æ ¼åå·"].Value); |
| | | txtHMaterName.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["ç©æåç§°"].Value); |
| | | } |
| | | else |
| | | { |
| | |
| | | |
| | | private void cmdHSaveBill_Click(object sender, EventArgs e) |
| | | { |
| | | |
| | | Display(); |
| | | } |
| | | |
| | |
| | | long HTMaterID = 0; |
| | | HTMaterID = ClsPub.isLong(grdMain.Rows[0].Cells[Fun_GetCol("HMaterID")].Value); |
| | | string sPackStr = "ZXM" + HYear + HPeriod + HDay + HTMaterID; //å¤ç®±ç åç¼ |
| | | |
| | | |
| | | //è·åå¤çè¿çæ¥æè·ä»å¤©å·®å 天 ç¶åå å 个+å· |
| | | TimeSpan HCY = Convert.ToDateTime(HPrdDate) - Convert.ToDateTime(DateTime.Now.ToString()); |
| | | int a = 1; |
| | | while (a <= HCY.Days) //å½a å°äº å·®å¼å¤©æ° 循ç¯å ä¸ + å· |
| | | { |
| | | HPrdDate = HPrdDate + "+"; |
| | | a = a + 1; |
| | | } |
| | | DataSet DsTM = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sPackStr + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | Int64 TTM_LSH = ClsPub.isInt(DsTM.Tables[0].Rows[0][0]) + 1; |
| | | DataSet DSet3 = oCn.RunProcReturn("select * from Gy_FactoryDayOff Where HFactoryDayOffDate='" + HDate1.ToString() + "'", "Gy_FactoryDayOff", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (DSet3 == null || DSet3.Tables[0].Rows.Count == 0) |
| | | { |
| | | sPackBarCode = sPackStr + TTM_LSH.ToString() ; |
| | | } |
| | | else |
| | | { |
| | | sPackBarCode = sPackStr + TTM_LSH.ToString() + "+"; |
| | | } |
| | | |
| | | |
| | | sPackBarCode = sPackStr + TTM_LSH.ToString(); |
| | | //DataSet DSet3 = oCn.RunProcReturn("select * from Gy_FactoryDayOff Where HFactoryDayOffDate='" + HDate1.ToString() + "'", "Gy_FactoryDayOff", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //if (DSet3 == null || DSet3.Tables[0].Rows.Count == 0) |
| | | //{ |
| | | // sPackBarCode = sPackStr + TTM_LSH.ToString() ; |
| | | //} |
| | | //else |
| | | //{ |
| | | // sPackBarCode = sPackStr + TTM_LSH.ToString() + "+"; |
| | | //} |
| | | |
| | | |
| | | oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sPackStr + "'"); |
| | | |
| | | |
| | |
| | | HJT = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[Fun_GetCol("设å¤")].Value); |
| | | HXH = HYear + HPeriod + HDay + HBC + HJT + HMaterNumber; |
| | | Ds99 = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HXH + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LSH3 = ClsPub.isInt(Ds99.Tables[0].Rows[0][0]); |
| | | LSH3 = ClsPub.isInt(Ds99.Tables[0].Rows[0][0]) + 1; |
| | | LSH4 = LSH3.ToString(); |
| | | |
| | | |
| | |
| | | //Sub_SaveBarCode(); |
| | | //// |
| | | |
| | | |
| | | |
| | | //bool flag = this.txtHZXQty.Text.Trim() != ""; |
| | | //double num; |
| | | //double HICMOQty = 0; |
| | | //if (flag) |
| | | //{ |
| | | // num = Pub_Class.ClsPub.isDoule(this.txtHZXQty.Text); |
| | | //} |
| | | //else |
| | | //{ |
| | | // num = Pub_Class.ClsPub.isDoule(this.txtHMiniQty.Text); |
| | | //} |
| | | //bool flag2 = num <= 0.0; |
| | | //if (flag2) |
| | | //{ |
| | | // MessageBox.Show("请è¾å
¥æ´ç®±æ°éï¼"); |
| | | //} |
| | | //else |
| | | //{ |
| | | // for (int i = 0; i < this.grdMain.Rows.Count; i++) |
| | | // { |
| | | // for (int i1 = 0; i1 < this.grdMain.Rows.Count; i1++) |
| | | // { |
| | | |
| | | // HICMOQty += Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i1].Cells["çäº§è®¢åæ°é"].Value); |
| | | // } |
| | | // if (HICMOQty < num) |
| | | // { |
| | | // MessageBox.Show("请ç¹å»è¶
é¢ç产æé®çææ¡ç ï¼"); |
| | | // break; |
| | | // } |
| | | |
| | | // bool flag3 = num > 0.0; |
| | | // if (!flag3) |
| | | // { |
| | | // break; |
| | | // } |
| | | // bool flag4 = num > Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | // if (!flag4) |
| | | // { |
| | | // this.grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = num; |
| | | // break; |
| | | // } |
| | | // num -= Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | // this.grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | // } |
| | | // this.Sub_SaveBarCode(); |
| | | |
| | | bool flag = this.txtHZXQty.Text.Trim() != ""; |
| | | double HICMOQty = 0.0; |
| | | bool flag5 = flag; |
| | | double num; |
| | | double HICMOQty = 0; |
| | | if (flag) |
| | | if (flag5) |
| | | { |
| | | num = Pub_Class.ClsPub.isDoule(this.txtHZXQty.Text); |
| | | num = ClsPub.isDoule(this.txtHZXQty.Text); |
| | | } |
| | | else |
| | | { |
| | | num = Pub_Class.ClsPub.isDoule(this.txtHMiniQty.Text); |
| | | num = ClsPub.isDoule(this.txtHMiniQty.Text); |
| | | } |
| | | bool flag2 = num <= 0.0; |
| | | if (flag2) |
| | | bool flag6 = flag2; |
| | | if (flag6) |
| | | { |
| | | MessageBox.Show("请è¾å
¥æ´ç®±æ°éï¼"); |
| | | } |
| | |
| | | { |
| | | for (int i = 0; i < this.grdMain.Rows.Count; i++) |
| | | { |
| | | for (int i1 = 0; i1 < this.grdMain.Rows.Count; i1++) |
| | | for (int i2 = 0; i2 < this.grdMain.Rows.Count; i2++) |
| | | { |
| | | |
| | | HICMOQty += Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i1].Cells["çäº§è®¢åæ°é"].Value); |
| | | HICMOQty += ClsPub.isDoule(this.grdMain.Rows[i2].Cells["çäº§è®¢åæ°é"].Value); |
| | | } |
| | | if (HICMOQty < num) |
| | | bool flag7 = HICMOQty < num; |
| | | if (flag7) |
| | | { |
| | | MessageBox.Show("请ç¹å»è¶
é¢ç产æé®çææ¡ç ï¼"); |
| | | break; |
| | | } |
| | | |
| | | bool flag3 = num > 0.0; |
| | | if (!flag3) |
| | | bool flag8 = !flag3; |
| | | if (flag8) |
| | | { |
| | | break; |
| | | } |
| | | bool flag4 = num > Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | if (!flag4) |
| | | bool flag4 = num > ClsPub.isDoule(this.grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | bool flag9 = !flag4; |
| | | if (flag9) |
| | | { |
| | | this.grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = num; |
| | | break; |
| | | } |
| | | num -= Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | this.grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | num -= ClsPub.isDoule(this.grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | this.grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = ClsPub.isDoule(this.grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | } |
| | | this.Sub_SaveBarCode(); |
| | | } |
| | |
| | | grdMain.DataSource = DSBefore.Tables[0].DefaultView; |
| | | txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | txtHMiniQty.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["æ åè£
ç®±"].Value); |
| | | txtHMaterModel.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["è§æ ¼åå·"].Value); |
| | | txtHMaterName.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["ç©æåç§°"].Value); |
| | | } |
| | | |
| | | |
| | |
| | | grdMain.DataSource = DSBefore.Tables[0].DefaultView; |
| | | txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | txtHMiniQty.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["æ åè£
ç®±"].Value); |
| | | txtHMaterModel.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["è§æ ¼åå·"].Value); |
| | | txtHMaterName.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["ç©æåç§°"].Value); |
| | | } |
| | | //txtHMaterID.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | } |
| | |
| | | Thread.Sleep(1000); |
| | | } |
| | | } |
| | | |
| | | private void label14_Click(object sender, EventArgs e) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |