| | |
| | | DSet = SubCn.RunProcReturn("exec h_p_KSTMSC '" + HSeOrderBillNo + "' ,'" + HICMOBillNo + "' , '" + HMaterName + "' , '" + HSourceName + "' ,'" + HEmpName + "' ,'" + HBeginDate + "'", "h_p_KSTMSC", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //çæé¦è¡æ é¢ |
| | | if (DSet == null) |
| | | //if (DSet == null|| DSet.Tables[0].Rows.Count == 0) |
| | | { |
| | | MessageBox.Show("没æè¿åä»»ä½ç»æ,请å¨è¿æ»¤æ¡ä¸ç¹å»ãæ¢å¤ãæé®,å°è¯å次æ¥è¯¢ï¼" + DBUtility.ClsPub.sExeReturnInfo); |
| | | return; |
| | |
| | | if (DSet.Tables[0].Rows.Count > 0) |
| | | { |
| | | txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | txtHMiniQty.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["æ åè£
ç®±"].Value); |
| | | } |
| | | else |
| | | { |
| | |
| | | initGrid(); |
| | | cmbHBarCodeType.SelectedIndex = 0; |
| | | dtpHBeginDate.Value = DateTime.Today; |
| | | string HUserName = ""; |
| | | HUserName = ClsPub.isStrNull(DBUtility.ClsPub.CurUserName); |
| | | Int64 HUserID = 0; |
| | | HUserID = ClsPub.isInt(DBUtility.ClsPub.CurUserID); |
| | | txtHEmpID.Text = HUserName; |
| | | txtHEmpID.Tag = HUserID; |
| | | } |
| | | |
| | | private void grdMain_DblClick(object sender, EventArgs e) |
| | |
| | | private void Sub_SetReport(string sOpenTmp) |
| | | { |
| | | //å¤æè¡æ° |
| | | for (int i = 0; i < grdList.Rows.Count; i++) |
| | | { |
| | | grdList.Rows[i].Cells[0].Value = ""; |
| | | } |
| | | for (int i = 0; i < grdList.SelectedRows.Count; i++) |
| | | { |
| | | grdList.Rows[grdMain.SelectedRows[i].Index].Cells[0].Value = "*"; |
| | | } |
| | | //for (int i = 0; i < grdList.Rows.Count; i++) |
| | | //{ |
| | | // grdList.Rows[i].Cells[0].Value = ""; |
| | | //} |
| | | //for (int i = 0; i < grdList.SelectedRows.Count; i++) |
| | | //{ |
| | | // grdList.Rows[grdMain.SelectedRows[i].Index].Cells[0].Value = "*"; |
| | | //} |
| | | // |
| | | Report = new GridppReport(); |
| | | Report.LoadFromFile(DBUtility.ClsPub.AppPath + @"\" + sOpenTmp + ".grf"); //here . |
| | |
| | | string HWorkLineName = ""; |
| | | string HSeOrderBillNo = ""; |
| | | string HInnerBillNo = ""; |
| | | Int64 HSourceID = 0; |
| | | //æ¯é |
| | | Double HMZQty = 0; |
| | | HMZQty = HZXQty * ClsPub.isDoule(grdMain.Rows[j].Cells[Fun_GetCol("å
é")].Value)/1000; |
| | | |
| | | HWei = WeiShu; |
| | | HBarCode = TM; |
| | | HBarCodeType = ClsPub.isStrNull(cmbHBarCodeType.Text); |
| | |
| | | HWorkLineName = ""; |
| | | HSeOrderBillNo = ""; |
| | | HInnerBillNo = sPackBarCode; |
| | | oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + |
| | | HSourceID = ClsPub.isInt(txtHSourceID.Tag); |
| | | oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HMaterialMQty" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + |
| | | ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " + |
| | | ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID " + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HSourceID,HInterID " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " + |
| | | ") values (" |
| | | + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID1.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() |
| | | + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID1.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() + ", " + HMZQty.ToString() |
| | | + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString() |
| | | + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HWei + "'" |
| | | + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'" |
| | | + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + HDate + "'" |
| | | + ", " + ClsPub.HOrgID.ToString() + "," + ClsPub.HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() |
| | | + ", " + ClsPub.HOrgID.ToString() + "," + ClsPub.HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HSourceID.ToString() + "," + HInterID.ToString() |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "')"); |
| | | |
| | | oCn.RunProc("exec h_p_WMS_SetMaxNo '" + HTMNumber + "'"); |
| | |
| | | |
| | | |
| | | sPackBarCode = ""; |
| | | DataSet DSet = oCn.RunProcReturn("select * from h_v_IF_BarCodeBillList Where HinterID=" + HInterID.ToString() + " and æ¡ç ç±»å = 'æçæ¡ç ' order by HItemID", "h_v_IF_BarCodeBillList", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | DataSet DSet = oCn.RunProcReturn("select * from h_v_IF_BarCodeBillList_CS Where HInterID=" + HInterID.ToString() + " and æ¡ç ç±»å = 'æçæ¡ç '", "h_v_IF_BarCodeBillList_CS", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //çæé¦è¡æ é¢ |
| | | if (DSet == null) |
| | | { |
| | |
| | | } |
| | | // |
| | | grdList.DataSource = DSet.Tables[0].DefaultView; |
| | | txtHZXQty.Text = ""; |
| | | //å»ç» |
| | | int FrCol = 0; |
| | | string s = "æ¯"; |
| | |
| | | //0ç»æäºå¡ |
| | | |
| | | // |
| | | Display(); |
| | | //Display(); |
| | | |
| | | |
| | | } |
| | |
| | | { |
| | | |
| | | //æ ¹æ®æ¬ç®±æ°é æ¥ åé
å° æ¯ä¸ªç产订åä¸ï¼åé
æ¶ è¦èè 订åå©ä½æ°éå·²ç»æ¯ è´æ°çæ
åµï¼ |
| | | //1.夿æ¬ç®±æ°é å¿
须大äº0 |
| | | //å¦æææ åè£
ç®±æ°é å
é»è®¤åæ åè£
ç®±æ°é 没æååæè¾çæ¬ç®±æ°é |
| | | //1.夿æ¬ç®±æ°é å¿
须大äº0 |
| | | double HZXQty = 0;//æ´ç®±æ°é |
| | | HZXQty = ClsPub.isDoule(txtHZXQty.Text); |
| | | if (txtHZXQty.Text.Trim() != "") |
| | | { |
| | | HZXQty = ClsPub.isDoule(txtHZXQty.Text); |
| | | } |
| | | else |
| | | { |
| | | HZXQty = ClsPub.isDoule(txtHMiniQty.Text); |
| | | } |
| | | if (HZXQty <= 0) |
| | | { |
| | | MessageBox.Show("请è¾å
¥æ´ç®±æ°éï¼"); |
| | | return; |
| | | } |
| | | //2.å·æ°ç½æ ¼ |
| | | Display(); |
| | | //Display(); |
| | | //3.ææ´ç®±æ°é åé
å° ç½æ ¼ä¸é¢çæ¯ä¸ä¸ª ç产订åä¸å»ã 循ç¯ç½æ ¼ |
| | | for(int i =0;i<grdMain.Rows.Count;i++) |
| | | { |
| | | if(HZXQty>0) |
| | | if (HZXQty > 0) |
| | | { |
| | | if(HZXQty>DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value)) |
| | | if (HZXQty > DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value)) |
| | | { |
| | | HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | |
| | | |
| | | private void cmdHSourceID_Click(object sender, EventArgs e) |
| | | { |
| | | Int64 HEmpID = 0; |
| | | HEmpID = ClsPub.isLong(txtHEmpID.Tag); |
| | | string HEmpName = ""; |
| | | HEmpName = ClsPub.isStrNull(txtHEmpID.Text); |
| | | |
| | | DAL.ClsGy_Source_View oSource = new DAL.ClsGy_Source_View(); |
| | | if (oSource.RefreshView()) |
| | | if (HEmpName != "") |
| | | { |
| | | this.txtHSourceID.Text = oSource.oModel.HName; |
| | | this.txtHSourceID.Tag = oSource.oModel.HItemID.ToString(); |
| | | // |
| | | Display(); |
| | | if (oSource.GetInfoByID(HEmpID)) |
| | | { |
| | | this.txtHSourceID.Text = oSource.oModel.HName; |
| | | this.txtHSourceID.Tag = oSource.oModel.HItemID.ToString(); |
| | | // |
| | | Display(); |
| | | } |
| | | else |
| | | { |
| | | this.txtHSourceID.Text = ""; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | this.txtHSourceID.Text = ""; |
| | | |
| | | if (oSource.RefreshView()) |
| | | { |
| | | this.txtHSourceID.Text = oSource.oModel.HName; |
| | | this.txtHSourceID.Tag = oSource.oModel.HItemID.ToString(); |
| | | // |
| | | Display(); |
| | | } |
| | | else |
| | | { |
| | | this.txtHSourceID.Text = ""; |
| | | } |
| | | } |
| | | //if (oSource.RefreshView()) |
| | | //{ |
| | | // this.txtHSourceID.Text = oSource.oModel.HName; |
| | | // this.txtHSourceID.Tag = oSource.oModel.HItemID.ToString(); |
| | | // // |
| | | // Display(); |
| | | //} |
| | | |
| | | //DAL.ClsGy_WorkCenter_View oWork = new DAL.ClsGy_WorkCenter_View(); |
| | | //if (oWork.RefreshView()) |
| | |
| | | DataSet DSBefore; |
| | | DSBefore = SubCn.RunProcReturn("exec h_p_PreviousMater "+ HInterID, "h_p_PreviousMater", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | grdMain.DataSource = DSBefore.Tables[0].DefaultView; |
| | | if (DSBefore.Tables[0].Rows.Count > 0) |
| | | //if (DSBefore.Tables[0].Rows.Count > 0) |
| | | //{ |
| | | // txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | //} |
| | | //else |
| | | //{ |
| | | |
| | | //} |
| | | if (DSBefore == null || DSBefore.Tables[0].Rows.Count == 0) |
| | | //if (DSet == null|| DSet.Tables[0].Rows.Count == 0) |
| | | { |
| | | txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | MessageBox.Show("没æä¸ä¸ä¸ªç©æ,妿éè¦è¯·æ¾æºä¿®ï¼" + DBUtility.ClsPub.sExeReturnInfo); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | |
| | | 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); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | private void button3_Click(object sender, EventArgs e) |
| | |
| | | HInterID = DBUtility.ClsPub.isInt(txtHMaterID.Tag); |
| | | DataSet DSBefore; |
| | | DSBefore = SubCn.RunProcReturn("exec h_p_NextMater " + HInterID, "h_p_NextMater", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | grdMain.DataSource = DSBefore.Tables[0].DefaultView; |
| | | txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | txtHMaterID.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | if (DSBefore == null || DSBefore.Tables[0].Rows.Count == 0) |
| | | //if (DSet == null|| DSet.Tables[0].Rows.Count == 0) |
| | | { |
| | | MessageBox.Show("没æä¸ä¸ä¸ªç©æ,妿éè¦è¯·æ¾æºä¿®ï¼" + DBUtility.ClsPub.sExeReturnInfo); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | 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); |
| | | } |
| | | //txtHMaterID.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | } |
| | | |
| | | //è¶
é¢æå° |
| | |
| | | return; |
| | | } |
| | | //2.å·æ°ç½æ ¼ |
| | | Display(); |
| | | //Display(); |
| | | //3.循ç¯ç½æ ¼ï¼ç´¯è®¡å
¨é¨å©ä½æ°éï¼å¤ææ¯å¦ å©ä½æ°é å°äº æ¬ç®±æ°éï¼å¦æ 大äºåæ¥é éåºã |
| | | double sumLeftQty = 0; |
| | | for (int i = 0; i < grdMain.Rows.Count; i++) |