| | |
| | | public DAL.ClsSc_StationInBill BillNew = new DAL.ClsSc_StationInBill(); |
| | | public DAL.ClsSc_StationInBill BillOld = new DAL.ClsSc_StationInBill(); |
| | | |
| | | public Int64 lngBillKey; |
| | | public Int64 lngBillSubKey; |
| | | public Int64 HInterID;//主å
å |
| | | public Int64 lngBillKey; //æµè½¬å¡ID |
| | | public Int64 lngBillSubKey; //æµè½¬å¡åID |
| | | |
| | | public Int64 lngICMOEntryID; |
| | | //------------------------------------------------------------------------- |
| | |
| | | this.txtHStationInTime.Text = DBUtility.ClsPub.GetServerDate(-1); |
| | | |
| | | this.txtHBillNo.Text = ClsPub.CreateBillCode(BillNew.BillType, ref ClsPub.sExeReturnInfo, true);//å¾å°æ°åå· |
| | | |
| | | if (lngBillKey != 0 ) |
| | | { |
| | | //LotShow(); |
| | | } |
| | | this.HInterID = DBUtility.ClsPub.CreateBillID(this.ModName, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //if (lngBillKey != 0 ) |
| | | //{ |
| | | // //LotShow(); |
| | | //} |
| | | |
| | | } |
| | | private void LotShow() //èªå¨è½½å
¥ æµè½¬å¡è¿ç«çé¢åè½ |
| | |
| | | return false; |
| | | //èµå¼ID |
| | | if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify) |
| | | { |
| | | BillNew.omodel.HInterID = BillOld.omodel.HInterID; |
| | | } |
| | | else |
| | | { |
| | | BillNew.omodel.HInterID = HInterID; |
| | | } |
| | | //主类èµå¼ |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | |
| | | Sub_WriteInForm_SM2(Ds.Tables[0], i); |
| | | } |
| | | //å¦æç³»ç»åæ°å¯ç¨äº è¿ç«åç»å®é
ä»¶æ¸
åå ä»çäº§ç¨ææ¸
åä¸è·åå·¥åºBOMåå
¥ 临æ¶è¡¨ï¼å¹¶å è½½è¡¨æ ¼ |
| | | |
| | | //å·æ°è¡¨ä½ç½æ ¼æ°æ® |
| | | |
| | | Pub_Class.ClsXt_SystemParameter oParam = new ClsXt_SystemParameter(); |
| | | string sIsBingLine = oParam.GetSingleSystemParameter("MES_StationInBill_LineBindCtl",ref DBUtility.ClsPub.sExeReturnInfo ); |
| | | if (sIsBingLine.Trim() == "Y") |
| | | { |
| | | oCn.RunProc("exec h_p_MES_StationInBillSubBindSource_Insert " + lngBillKey.ToString() + " , " + lngBillSubKey.ToString() + "," + HInterID.ToString() + " "); |
| | | //å·æ°è¡¨ä½ç½æ ¼æ°æ® |
| | | DisplaySub(); |
| | | } |
| | | // |
| | | txtHGroupID.Focus(); |
| | | } |
| | |
| | | //é
ä»¶æ¡å½¢ç å车äºä»¶ |
| | | private void txtHBarCode_Mater_KeyDown(object sender, KeyEventArgs e) |
| | | { |
| | | if (e.KeyCode == Keys.Return) |
| | | try |
| | | { |
| | | //å
夿 临æ¶è¡¨ä¸æ¯å¦ææ°æ® |
| | | |
| | | //夿æ¡å½¢ç æ¯å¦å¨æ¡ç æ¡£æ¡ä¸ |
| | | |
| | | //夿æ¡å½¢ç æ¯å¦åç |
| | | |
| | | //åå
¥ æ«ç è®°å½è¡¨ |
| | | |
| | | //å·æ°è¡¨ä½ç½æ ¼æ°æ® |
| | | |
| | | if (e.KeyCode == Keys.Return) |
| | | { |
| | | if (txtHBarCode_Mater.Text.Trim() == "") |
| | | { |
| | | MessageBox.Show("请è¾å
¥æ¡å½¢ç ï¼"); |
| | | return; |
| | | } |
| | | string sBarCode = txtHBarCode_Mater.Text.Trim(); |
| | | txtHBarCode_Mater.Text = ""; |
| | | //夿æ¡å½¢ç æ¯å¦å¨æ¡ç æ¡£æ¡ä¸ï¼å¤ææ¡å½¢ç æ¯å¦åç |
| | | //å
夿 临æ¶è¡¨ä¸æ¯å¦ææ°æ®ï¼æ¡å½¢ç çç©ææ¯å¦å¨æ¸
åä¸ï¼åå
¥ æ«ç è®°å½è¡¨ |
| | | //å¾å°ä¿¡æ¯ |
| | | SQLHelper.ClsCN oCn = new ClsCN(); |
| | | DataSet Ds; |
| | | Ds = oCn.RunProcReturn("exec h_p_MES_StationInBillSub_BindBarCode " + HInterID.ToString() + " ,'" + sBarCode + "'", "h_p_MES_StationInBillSub_BindBarCode"); |
| | | //åå
¥ä¿¡æ¯ |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | MessageBox.Show("æªæ¥è¯¢å°æ¡å½¢ç ä¿¡æ¯ï¼"); |
| | | return; |
| | | } |
| | | else if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 2) |
| | | { |
| | | MessageBox.Show("é误ï¼" + DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0][1])); |
| | | return; |
| | | } |
| | | //å·æ°è¡¨ä½ç½æ ¼æ°æ®ï¼æå¥½é¢è²æ¾ç¤ºï¼ |
| | | DisplaySub(); |
| | | } |
| | | } |
| | | catch (Exception e1) |
| | | { |
| | | MessageBox.Show(e1.Message + "txtHBarCode_Mater_KeyDown"); |
| | | } |
| | | } |
| | | |
| | | private void DisplaySub() |
| | | { |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCn = new ClsCN(); |
| | | DataSet Dsplay; |
| | | Dsplay = oCn.RunProcReturn("exec h_p_MES_StationInBillSub_BindDisplay " + HInterID.ToString() + " ", "h_p_MES_StationInBillSub_BindDisplay"); |
| | | //åå
¥ä¿¡æ¯ |
| | | if (Dsplay == null || Dsplay.Tables[0].Rows.Count == 0) |
| | | { |
| | | MessageBox.Show("å·æ°å¤±è´¥ï¼"); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | grdSub.DataSource = Dsplay.Tables[0].DefaultView; |
| | | //设置å计å |
| | | //string sTotalCol = ""; |
| | | //sTotalCol = DBUtility.Gy_BaseFun.GetTotalCols(DSet); |
| | | //string[] sT; |
| | | //sT = sTotalCol.Split(Convert.ToChar(",")); |
| | | //oSumGrid.BuildTotalCols(sT); |
| | | // |
| | | //å»ç» |
| | | int FrCol = 0; |
| | | string s = "æ¯"; |
| | | DBUtility.Xt_BaseBillFun.DisplayGrid(grdSub, this.Name + "grdSub", s, FrCol); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | MessageBox.Show(e.Message + "DisplaySub"); |
| | | } |
| | | } |
| | | } |
| | | } |