| | |
| | | public void Sub_ClearBill() |
| | | { |
| | | DBUtility.Xt_BaseBillFun.Sub_ClearBill(gbUp); |
| | | DBUtility.Xt_BaseBillFun.Sub_ClearBill1(tabPage1); |
| | | DBUtility.Xt_BaseBillFun.Sub_ClearBill1(tabPage2); |
| | | initGrid(); |
| | | txtHBarCode.Text = ""; |
| | | txtHProcExchBillNo.Enabled = true; |
| | | txtHWWWorkOrderBillNo.Enabled = true; |
| | | txtHProcNo.Enabled = true; |
| | | txtHBarCode.Enabled = true; |
| | | tabControl1.SelectedIndex = 0; |
| | | txtHBarCode.Focus(); |
| | | lngBillKey = 0; |
| | | } |
| | | |
| | | //åå§åGRID |
| | | private void initGrid() |
| | | { |
| | | DBUtility.Xt_BaseBillFun.initGridMESList(grdCardList, this.Name + "grdCardList"); |
| | | grdCardList.DataSource = null; |
| | | } |
| | | //è¿ç«æé® |
| | | private void cmdOK_Click(object sender, EventArgs e) |
| | |
| | | if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify) |
| | | BillNew.omodel.HInterID = BillOld.omodel.HInterID; |
| | | //主类èµå¼ |
| | | BillNew.omodel.HYear = 2011; |
| | | BillNew.omodel.HPeriod = 1; |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DBUtility.ClsPub.isDate(this.txtHStationInTime.Text), ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | MessageBox.Show(s, "æç¤º"); |
| | | return false; |
| | | } |
| | | // |
| | | BillNew.omodel.HYear = sYear; |
| | | BillNew.omodel.HPeriod = sPeriod; |
| | | BillNew.omodel.HBillNo = this.txtHBillNo.Text.Trim(); |
| | | BillNew.omodel.HInnerBillNo = this.txtHInnerBillNo.Text.Trim(); |
| | | BillNew.omodel.HICMOBillNo = this.txtHICMOBillNo.Text.Trim(); |
| | |
| | | if (e.KeyCode == Keys.Enter) |
| | | { |
| | | cmdOK.Select(); |
| | | txtHWWWorkOrderBillNo.Focus(); |
| | | } |
| | | } |
| | | |
| | |
| | | MessageBox.Show("没æå½å
¥æµè½¬å¡å·æè
æµæ°´å·"); |
| | | return; |
| | | } |
| | | //æ ¹æ®å·¥å·è·åå§å¤å·¥å åå
ç ï¼åå
ç |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | ds = oCn.RunProcReturn("exec h_p_WW_GetWWWorkBillInfoByNo '" + txtHWWWorkOrderBillNo.Text + "'," + lngBillKey.ToString() + "," + lngBillSubKey.ToString(), "h_p_WW_GetWWWorkBillInfoByNo"); |
| | | if (ds == null) |
| | | { |
| | | MessageBox.Show("æ²¡ææ¾å°å¯¹åºçå§å¤å·¥åï¼"); |
| | | return; |
| | | } |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | txtHWWWorkOrderBillNo.Text = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBillNo"]); |
| | | lngBillKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID"]); |
| | | lngBillSubKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HEntryID"]); |
| | | txtHWWWorkOrderBillNo.Enabled = false; |
| | | } |
| | | |
| | | ////æ ¹æ®å·¥å·è·åå§å¤å·¥å åå
ç ï¼åå
ç |
| | | //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | //DataSet ds; |
| | | //ds = oCn.RunProcReturn("exec h_p_WW_GetWWWorkBillInfoByNo '" + txtHWWWorkOrderBillNo.Text + "'," + lngBillKey.ToString() + "," + lngBillSubKey.ToString(), "h_p_WW_GetWWWorkBillInfoByNo"); |
| | | //if (ds == null) |
| | | //{ |
| | | // MessageBox.Show("æ²¡ææ¾å°å¯¹åºçå§å¤å·¥åï¼"); |
| | | // return; |
| | | //} |
| | | //if (ds.Tables[0].Rows.Count > 0) |
| | | //{ |
| | | // txtHWWWorkOrderBillNo.Text = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBillNo"]); |
| | | // lngBillKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID"]); |
| | | // lngBillSubKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HEntryID"]); |
| | | // txtHWWWorkOrderBillNo.Enabled = false; |
| | | //} |
| | | txtHRemark.Focus(); |
| | | } |
| | | } |
| | | |
| | |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | txtHProcExchBillNo.Text = ""; |
| | | txtHBarCode.Text = ""; |
| | | MessageBox.Show("æªæ¥è¯¢å°æµè½¬å¡ä¿¡æ¯ï¼"); |
| | | return; |
| | | } |
| | |
| | | //} |
| | | } |
| | | |
| | | //æ°å¢ |
| | | private void cmdXZ_Click(object sender, EventArgs e) |
| | | { |
| | | this.Sub_AddBill(); |
| | | } |
| | | |
| | | } |
| | | } |