| | |
| | | txtHUnitName.Text = oTable.Rows[0]["计éåä½"].ToString();
|
| | | txtHUnitName.Tag = oTable.Rows[0]["HUnitID"].ToString();
|
| | | txtHBatchNo.Text = oTable.Rows[0]["æ¹æ¬¡"].ToString();
|
| | | txtHSumQty.Text = DBUtility.ClsPub.isDoule(oTable.Rows[0]["æ°é"].ToString(), 1);
|
| | | txtHSumQty.Text = DBUtility.ClsPub.isDoule(oTable.Rows[0]["æ°é"].ToString(), 2);
|
| | | txtHRelationQty.Text = oTable.Rows[0]["å·²çææ¡ç æ°é"].ToString();
|
| | | txtHSYQty.Text = oTable.Rows[0]["æªçææ¡ç æ°é"].ToString();
|
| | | txtHKSQty.Text = lblHNowQty.Text;
|
| | | txtHDQQty.Text = lblHNowQty.Text;
|
| | | if (DBUtility.ClsPub.isDoule(txtHDQQty.Text) - DBUtility.ClsPub.isDoule(txtHKSQty.Text) > 0)
|
| | | {
|
| | | txtHSJQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHDQQty.Text) - DBUtility.ClsPub.isDoule(txtHKSQty.Text), 1);
|
| | | txtHSJQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHDQQty.Text) - DBUtility.ClsPub.isDoule(txtHKSQty.Text), 2);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | //å»ç»
|
| | | ClsPub1.DisplayGrid(grdSub, this.Name + "grdSub", s, FrCol);
|
| | | /////////////////////////////
|
| | | txtHRelationQty.Text = DBUtility.ClsPub.isDoule(DSet.Tables[2].Rows[0]["å
³èæ°é"], 1);
|
| | | txtHRelationQty.Text = DBUtility.ClsPub.isDoule(DSet.Tables[2].Rows[0]["å
³èæ°é"], 2);
|
| | | if (DBUtility.ClsPub.isDoule(txtHSumQty.Text) - DBUtility.ClsPub.isDoule(txtHRelationQty.Text) >= 0)
|
| | | {
|
| | | txtHSYQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHSumQty.Text) - DBUtility.ClsPub.isDoule(txtHRelationQty.Text), 1);
|
| | | txtHSYQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHSumQty.Text) - DBUtility.ClsPub.isDoule(txtHRelationQty.Text), 2);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | | if (DBUtility.ClsPub.isDoule(txtHDQQty.Text) - DBUtility.ClsPub.isDoule(txtHKSQty.Text) >= 0)
|
| | | {
|
| | | txtHSJQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHDQQty.Text) - DBUtility.ClsPub.isDoule(txtHKSQty.Text), 1); //å®é
ç±³æ°= å½åç±³æ°-å¼å§ç±³æ°
|
| | | txtHSJQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHDQQty.Text) - DBUtility.ClsPub.isDoule(txtHKSQty.Text), 2); //å®é
ç±³æ°= å½åç±³æ°-å¼å§ç±³æ°
|
| | | lblHRelQty.Text = txtHSJQty.Text;
|
| | | }
|
| | | else
|
| | |
| | | if (MessageBox.Show("å½åç±³æ°å°äºå¼å§ç±³æ°ï¼æ¯å¦ç¡®å®è¦æ¸
é¶å¼å§ç±³æ°", "æç¤º", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
|
| | | {
|
| | | txtHKSQty.Text = "0";
|
| | | txtHSJQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHDQQty.Text), 1); //å®é
ç±³æ°= å½åç±³æ°-å¼å§ç±³æ°
|
| | | txtHSJQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHDQQty.Text), 2); //å®é
ç±³æ°= å½åç±³æ°-å¼å§ç±³æ°
|
| | | lblHRelQty.Text = txtHSJQty.Text;
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | HQty = DBUtility.ClsPub.isDoule(txtHSumQty.Text);
|
| | | HRelQty = DBUtility.ClsPub.isDoule(txtHSJQty.Text);
|
| | | HPrintQty = HRelQty;
|
| | | //HPrintQty = HRelQty;
|
| | | HRelDiffQty = DBUtility.ClsPub.isDoule(txtHSJQty.Text) - DBUtility.ClsPub.isDoule(txtHSumQty.Text);
|
| | | }
|
| | | else
|
| | | {
|
| | | HQty = DBUtility.ClsPub.isDoule(txtHSJQty.Text);
|
| | | HRelQty = DBUtility.ClsPub.isDoule(txtHSJQty.Text);
|
| | | HPrintQty = HRelQty;
|
| | | //HPrintQty = HRelQty;
|
| | | HRelDiffQty = 0;
|
| | | }
|
| | | //
|
| | |
| | | HGBBarCode = "";
|
| | | POOrderBillNo = "";
|
| | | string sSQLMul = " insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" +
|
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" +
|
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty,HLabelQty" +
|
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " +
|
| | | ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " +
|
| | | ",HCusID,HCusType,HEndDate,HWorkLineName,HJiaYe " +
|
| | |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HBadReasonList,HProdLev " +
|
| | | ") values ("
|
| | | + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString()
|
| | | + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HRelDiffQty.ToString()
|
| | | + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HRelDiffQty.ToString() + "," + HRelQty.ToString()
|
| | | + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillTypeID + "','" + HWei + "'"
|
| | | + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'"
|
| | | + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + HJiaYe2 + "'"
|
| | |
| | | Report.FieldByName("ç©æåç§°").AsString = ClsPub.isStrNull(txtHMaterName.Text);
|
| | | Report.FieldByName("è§æ ¼åå·").AsString = ClsPub.isStrNull(txtHMaterModel.Text);
|
| | | Report.FieldByName("æ¡ç ç¼å·").AsString = HBarCode;
|
| | | Report.FieldByName("æ°é").AsString = ClsPub.isStrNull(txtHSJQty.Text);
|
| | | //è·åæ°éï¼ éå®è£åæ°éä¸ºè®¢åæ°é峿ºåæ°éï¼ |
| | | if (HSourceBillType == "ç产订å") //éå®è£å
|
| | | {
|
| | | Report.FieldByName("æ°é").AsString = ClsPub.isStrNull(txtHSumQty.Text);
|
| | | }
|
| | | else
|
| | | {
|
| | | Report.FieldByName("æ°é").AsString = ClsPub.isStrNull(txtHSJQty.Text);
|
| | | }
|
| | | Report.FieldByName("å®é
æ°é").AsString = ClsPub.isStrNull(txtHSJQty.Text);
|
| | | Report.FieldByName("çç»").AsString = ClsPub.isStrNull(txtHGroupID.Text);
|
| | | Report.FieldByName("ç»å").AsString = ClsPub.isStrNull(txtHEmpID.Text) + ";" + ClsPub.isStrNull(txtHEmpID2.Text) + ";" + ClsPub.isStrNull(txtHEmpID3.Text);
|
| | | Report.FieldByName("æ°é").AsString = ClsPub.isStrNull(txtHSJQty.Text);
|
| | | Report.FieldByName("æ§ç©æç¼ç ").AsString = ClsPub.isStrNull(txtHOldMaterNumber.Text);
|
| | | //Report.FieldByName("æºååå·").AsString = ClsPub.isStrNull(grdSub.Rows[CurRows].Cells[HSourceBillNoCol].Value);
|
| | | //Report.FieldByName("éå®è®¢åå·").AsString = ClsPub.isStrNull(grdSub.Rows[CurRows].Cells[HSeOrderBillNo2Col].Value);
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | newStr = DBUtility.ClsPub.isDoule(NewQty, 1);
|
| | | newStr = DBUtility.ClsPub.isDoule(NewQty, 2);
|
| | | }
|
| | | //
|
| | | lblHNowQty.Text = newStr; //å½åç±³æ° æ ç¾
|
| | | txtHDQQty.Text = newStr; //å½åæ°é ææ¬
|
| | | if (DBUtility.ClsPub.isDoule(txtHDQQty.Text) - DBUtility.ClsPub.isDoule(txtHKSQty.Text) > 0)
|
| | | {
|
| | | txtHSJQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHDQQty.Text) - DBUtility.ClsPub.isDoule(txtHKSQty.Text), 1); //å®é
ç±³æ°= å½åç±³æ°-å¼å§ç±³æ°
|
| | | txtHSJQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHDQQty.Text) - DBUtility.ClsPub.isDoule(txtHKSQty.Text), 2); //å®é
ç±³æ°= å½åç±³æ°-å¼å§ç±³æ°
|
| | | lblHRelQty.Text = txtHSJQty.Text;
|
| | | }
|
| | | else
|
| | | {
|
| | | txtHSJQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHDQQty.Text), 1); //å®é
ç±³æ°= å½åç±³æ°-å¼å§ç±³æ°
|
| | | txtHSJQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHDQQty.Text), 2); //å®é
ç±³æ°= å½åç±³æ°-å¼å§ç±³æ°
|
| | | lblHRelQty.Text = txtHSJQty.Text;
|
| | | }
|
| | | }
|
| | |
| | | private void cmdZero_Click(object sender, EventArgs e)
|
| | | {
|
| | | txtHKSQty.Text = "0";
|
| | | txtHSJQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHDQQty.Text) - DBUtility.ClsPub.isDoule(txtHKSQty.Text), 1);
|
| | | txtHSJQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHDQQty.Text) - DBUtility.ClsPub.isDoule(txtHKSQty.Text), 2);
|
| | |
|
| | | }
|
| | |
|