| | |
| | | MessageBox.Show("没æè¿åä»»ä½ç»æ,请å¨è¿æ»¤æ¡ä¸ç¹å»ãæ¢å¤ãæé®,å°è¯å次æ¥è¯¢ï¼" + DBUtility.ClsPub.sExeReturnInfo); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | grdMain.DataSource = DSet.Tables[0].DefaultView; |
| | | //æå½ååæ®ID åå°ä¸ä¸ªæé®éé¢ å·æ°æ¶æ¯æ¬¡åä¸é |
| | | if (DSet.Tables[0].Rows.Count > 0) |
| | | { |
| | | txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | } |
| | | else |
| | | { |
| | | |
| | | } |
| | | } |
| | | // |
| | | grdMain.DataSource = DSet.Tables[0].DefaultView; |
| | | |
| | | |
| | | //æ åè£
ç®± |
| | | //for (int i = 0; i < grdMain.SelectedRows.Count; i++) |
| | |
| | | private void Sub_SetReport(string sOpenTmp) |
| | | { |
| | | //å¤æè¡æ° |
| | | for (int i = 0; i < grdMain.Rows.Count; i++) |
| | | for (int i = 0; i < grdList.Rows.Count; i++) |
| | | { |
| | | grdMain.Rows[i].Cells[0].Value = ""; |
| | | grdList.Rows[i].Cells[0].Value = ""; |
| | | } |
| | | for (int i = 0; i < grdMain.SelectedRows.Count; i++) |
| | | for (int i = 0; i < grdList.SelectedRows.Count; i++) |
| | | { |
| | | grdMain.Rows[grdMain.SelectedRows[i].Index].Cells[0].Value = "*"; |
| | | grdList.Rows[grdMain.SelectedRows[i].Index].Cells[0].Value = "*"; |
| | | } |
| | | // |
| | | Report = new GridppReport(); |
| | |
| | | try |
| | | { |
| | | DataTable ds = new DataTable(); |
| | | BLL.Utility.FillRecordToReport_Sel(Report, grdMain, ds, Fun_GetCol("éæ©")); |
| | | BLL.Utility.FillRecordToReport_Sel(Report, grdList, ds, Fun_GetCol("éæ©")); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | //çæä¸ä¸ªå¤ç®±ç |
| | | string sPackStr = "ZXM" + HYear + HPeriod + HDay; //å¤ç®±ç åç¼ |
| | | 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.isLong(DsTM.Tables[0].Rows[0][0]) + 1; |
| | | string sPackBarCode = sPackStr + LSH.ToString(); |
| | | Int64 TTM_LSH = ClsPub.isInt(DsTM.Tables[0].Rows[0][0]) + 1; |
| | | string sPackBarCode = sPackStr + TTM_LSH.ToString(); |
| | | oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sPackStr + "'"); |
| | | |
| | | |
| | | |
| | | //MessageBox.Show("11"); |
| | | oCn.RunProc("insert into Sc_PackUnionBillMain (HYear,HPeriod,HBillType,HInterID,HDate" + |
| | | ",HBillNo,HBillStatus,HICMOBillNo,HBarCode_Pack,HMaterID,HUnitID,HWeight" + |
| | | ",HPWeight,HProdOrgID,HDeptID,HEmpID,HSNum,HPackNum,HBarCode_Cus,HBatchNo " + |
| | | ") values (" |
| | | + HYear + "," + HPeriod + ",'3783'," + HInterID_TTM + ",'" + HDate + "'" |
| | | + ", '" + sPackBarCode.ToString() + "',1,'','" + sPackBarCode.ToString() + "',0,0,0" |
| | | + ",0,1,0,0,0,0,'','')"); |
| | | //MessageBox.Show("12"); |
| | | |
| | | //1.循ç¯ç½æ ¼ï¼æ ¹æ® æ¬æ¬¡æ°é å çæ å¯ä¸ç |
| | | |
| | | for (int j = 0; j < grdMain.Rows.Count; j++) |
| | | |
| | | for (int j = 0; j < grdMain.Rows.Count; j++) |
| | | { |
| | | if (DBUtility.ClsPub.isDoule(grdMain.Rows[j].Cells[Fun_GetCol("æ¬æ¬¡æ°é")].Value) > 0) |
| | | { |
| | |
| | | |
| | | //HBQty = HBQty + ClsPub.isInt(txtHBQty.Text); |
| | | HZXQty = DBUtility.ClsPub.isDoule(grdMain.Rows[j].Cells[Fun_GetCol("æ¬æ¬¡æ°é")].Value); |
| | | HDDQty = DBUtility.ClsPub.isDoule(grdMain.Rows[j].Cells[Fun_GetCol("è®¢åæ°é")].Value); |
| | | HDDQty = DBUtility.ClsPub.isDoule(grdMain.Rows[j].Cells[Fun_GetCol("çäº§è®¢åæ°é")].Value); |
| | | HICMOBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[Fun_GetCol("ç产订åå·")].Value); |
| | | |
| | | HTMNumber = HOrgNumber + HMaterNumber + HYear + HPeriod + HDay; |
| | |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "')"); |
| | | |
| | | oCn.RunProc("exec h_p_WMS_SetMaxNo '" + HTMNumber + "'"); |
| | | DisplayTM(); |
| | | } |
| | | } |
| | | //2.循ç¯ç»æåï¼æ ¹æ® æ¬æ¬¡çæç 主å
ç ï¼ä»åå°æ°æ®åºè·å æ¡ç å表ï¼çæ ç»æå å ææ¡ç ï¼ ç´æ¥è°ç¨åå¨è¿ç¨ |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | 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); |
| | | //çæé¦è¡æ é¢ |
| | | if (DSet == null) |
| | | { |
| | | MessageBox.Show("没æè¿åä»»ä½ç»æ,æ¡ç ä¸åå¨ï¼" + DBUtility.ClsPub.sExeReturnInfo); |
| | | return; |
| | | } |
| | | // |
| | | grdList.DataSource = DSet.Tables[0].DefaultView; |
| | | //å»ç» |
| | | int FrCol = 0; |
| | | string s = "æ¯"; |
| | | DBUtility.Xt_BaseBillFun.DisplayGrid(grdList, this.Name + "grdList", s, FrCol); |
| | | oCn.Commit(); |
| | | //DisplayTM(); |
| | | MessageBox.Show("æ¡ç çæå®æ¯ï¼"); |
| | | |
| | | |
| | |
| | | |
| | | // |
| | | Display(); |
| | | |
| | | |
| | | } |
| | | catch(Exception e ) |
| | | catch (Exception e ) |
| | | { |
| | | //åæ»äºå¡ |
| | | |
| | |
| | | |
| | | private void button4_Click(object sender, EventArgs e) |
| | | { |
| | | |
| | | //æ ¹æ®æ¬ç®±æ°é æ¥ åé
å° æ¯ä¸ªç产订åä¸ï¼åé
æ¶ è¦èè 订åå©ä½æ°éå·²ç»æ¯ è´æ°çæ
åµï¼ |
| | | //1.夿æ¬ç®±æ°é å¿
须大äº0 |
| | | double HZXQty = 0;//æ´ç®±æ°é |
| | |
| | | + ",'3710'," + HMaterID1.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() + ",0,0,0" |
| | | + ", 0,getdate(),'" + HBarCode + "','" + TTM + "',0,0)"); |
| | | |
| | | DataSet DSet = oCn.RunProcReturn("select * from h_v_IF_BarCodeBillList Where HInterID=" + HInterID.ToString() + " and HBarCode like '%ZXM&' order by HItemID", "h_v_IF_BarCodeBillList", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //çæé¦è¡æ é¢ |
| | | if (DSet == null) |
| | | { |
| | | MessageBox.Show("没æè¿åä»»ä½ç»æ,æ¡ç ä¸åå¨ï¼" + DBUtility.ClsPub.sExeReturnInfo); |
| | | return; |
| | | } |
| | | // |
| | | grdList.DataSource = DSet.Tables[0].DefaultView; |
| | | |
| | | oCn.Commit(); |
| | | MessageBox.Show("æ¡ç çæå®æ¯ï¼"); |
| | | //grdSub.RowCount = 0; |
| | | DisplayTM(); |
| | | //DisplayTM(); |
| | | |
| | | } |
| | | catch (Exception e1) |
| | | { |
| | |
| | | |
| | | private void DisplayTM() |
| | | { |
| | | DataSet DSet = oCn.RunProcReturn("select * from h_v_IF_BarCodeBillList Where HinterID=" + HInterID.ToString() + " order by HItemID", "h_v_IF_BarCodeBillList", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //HInterID = DBUtility.ClsPub.isInt(txtHMaterID.Tag); |
| | | 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); |
| | | //çæé¦è¡æ é¢ |
| | | if (DSet == null) |
| | | { |
| | |
| | | |
| | | private void cmdHSourceID_Click(object sender, EventArgs e) |
| | | { |
| | | DAL.ClsGy_WorkCenter_View oWork = new DAL.ClsGy_WorkCenter_View(); |
| | | if (oWork.RefreshView()) |
| | | DAL.ClsGy_Source_View oSource = new DAL.ClsGy_Source_View(); |
| | | if (oSource.RefreshView()) |
| | | { |
| | | this.txtHSourceID.Text = oWork.oModel.HName; |
| | | this.txtHSourceID.Tag = oWork.oModel.HItemID.ToString(); |
| | | this.txtHSourceID.Text = oSource.oModel.HName; |
| | | this.txtHSourceID.Tag = oSource.oModel.HItemID.ToString(); |
| | | // |
| | | Display(); |
| | | // |
| | | } |
| | | else |
| | | { |
| | | this.txtHSourceID.Text = ""; |
| | | } |
| | | |
| | | //DAL.ClsGy_WorkCenter_View oWork = new DAL.ClsGy_WorkCenter_View(); |
| | | //if (oWork.RefreshView()) |
| | | //{ |
| | | // this.txtHSourceID.Text = oWork.oModel.HName; |
| | | // this.txtHSourceID.Tag = oWork.oModel.HItemID.ToString(); |
| | | // // |
| | | // Display(); |
| | | // // |
| | | //} |
| | | //else |
| | | //{ |
| | | // this.txtHSourceID.Text = ""; |
| | | //} |
| | | } |
| | | |
| | | private void cmdHEmpID_Click(object sender, EventArgs e) |
| | |
| | | { |
| | | //è·åç½æ ¼ç¬¬ä¸è¡HInterIDçå¼ |
| | | Int64 HInterID = 0; |
| | | HInterID = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells[Fun_GetCol("HInterID")].Value); |
| | | HInterID = DBUtility.ClsPub.isInt(txtHMaterID.Tag); |
| | | 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) |
| | | { |
| | | txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value); |
| | | } |
| | | else |
| | | { |
| | | |
| | | } |
| | | } |
| | | |
| | | private void button3_Click(object sender, EventArgs e) |
| | | { |
| | | //æ ¹æ® |
| | | Int64 HInterID = 0; |
| | | HInterID = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells[Fun_GetCol("HInterID")].Value); |
| | | //HInterID = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells[Fun_GetCol("HInterID")].Value); |
| | | 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); |
| | | } |
| | | |
| | | //è¶
é¢æå° |