| | |
| | | public const Int16 HMouldNoCol = 79; |
| | | public const Int16 HProcWorkNumCol = 80; |
| | | public const Int16 HICMOEntryIDCol = 81; |
| | | public const Int16 HSNCtrlCol = 82; |
| | | |
| | | |
| | | |
| | |
| | | this.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew; |
| | | this.Sub_OperStatus();//设置TOOLBAR |
| | | this.Sub_ClearBill();//æ¸
空çé¢ |
| | | this.txtHBillNo.Text = ClsPub.CreateBillCode(BillNew.BillType, ref ClsPub.sExeReturnInfo, true);//å¾å°æ°åå· |
| | | //this.txtHBillNo.Text = ClsPub.CreateBillCode(BillNew.BillType, ref ClsPub.sExeReturnInfo, true);//å¾å°æ°åå· |
| | | this.txtHBillNo.Text = ClsPub.CreateBillCode_Prod(BillNew.BillType, ref ClsPub.sExeReturnInfo, true);//å¾å°æ°åå· 20240620è¿å弿¹ååå¨è¿ç¨ |
| | | this.txtHBillNo.Enabled = true; |
| | | this.txtHBillNo.Focus(); |
| | | //ç°åº¦æºåç±»å |
| | |
| | | grdMain.Rows[i].Cells[HTechnologyParameterCol].Value = oSub.HTechnologyParameter.ToString(); |
| | | grdMain.Rows[i].Cells[HOverRateCol].Value = oSub.HOverRate.ToString(); |
| | | grdMain.Rows[i].Cells[HMaxQtyCol].Value = oSub.HMaxQty.ToString(); |
| | | grdMain.Rows[i].Cells[HSNCtrlCol].Value = DBUtility.ClsPub.isBool(oSub.HSNCtrl); |
| | | |
| | | // |
| | | grdMain.Rows[i].Cells[HICMOBillNoCol].Value = oSub.HICMOBillNo; |
| | |
| | | oSub.HProcCheckNote = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HProcCheckNoteCol].Value); |
| | | oSub.HMouldNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HMouldNoCol].Value); |
| | | oSub.HProcWorkNum = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HProcWorkNumCol].Value); |
| | | oSub.HSNCtrl = DBUtility.ClsPub.isBool(grdMain.Rows[i].Cells[HSNCtrlCol].Value); |
| | | BillNew.DetailColl.Add(oSub); |
| | | } |
| | | } |
| | |
| | | { |
| | | |
| | | // |
| | | grdMain.ColumnCount = 82; //æ»åæ° |
| | | grdMain.ColumnCount = 83; //æ»åæ° |
| | | DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name); |
| | | // |
| | | grdMain.RowsDefaultCellStyle.WrapMode = DataGridViewTriState.True; |
| | |
| | | grdMain.Columns[HEditCol].HeaderText = "ä¸å¯ç¼è¾"; |
| | | grdMain.Columns[HOverRateCol].HeaderText = "è¶
颿¯ä¾"; |
| | | grdMain.Columns[HMaxQtyCol].HeaderText = " æé«ä¸é"; |
| | | grdMain.Columns[HSNCtrlCol].HeaderText = "SNç è¿ç«"; |
| | | |
| | | |
| | | //æ ¼å¼å |
| | |
| | | oCell2.Value = 0; |
| | | oCell2.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; |
| | | grdMain.Rows[i].Cells[HEditCol] = oCell2; |
| | | //SNç è¿ç« |
| | | DataGridViewCheckBoxCell oCell3 = new DataGridViewCheckBoxCell(); |
| | | oCell3.ThreeState = false; |
| | | oCell3.Value = 0; |
| | | oCell3.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; |
| | | grdMain.Rows[i].Cells[HSNCtrlCol] = oCell3; |
| | | } |
| | | //æ ¼å¼åç½æ ¼ |
| | | DBUtility.Xt_BaseBillFun.initGridLast(sAllowCol, sTotalCol, oSumGrid); |
| | |
| | | string sNo = ""; |
| | | int row = oTable.Rows.Count - 1; |
| | | |
| | | //è·åç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | Ds = oCn.RunProcReturn("select HValue from Xt_SystemParameter with(nolock) where HKey='WMS_CampanyName'", "Xt_SystemParameter", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | MessageBox.Show("è·åç³»ç»åæ°å¤±è´¥ï¼åå :" + DBUtility.ClsPub.sExeReturnInfo, "æç¤º"); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | CampanyName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HValue"]); |
| | | } |
| | | if (CampanyName == "å¯è´å¥ç¹") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | | ////è·åç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | //Ds = oCn.RunProcReturn("select HValue from Xt_SystemParameter with(nolock) where HKey='WMS_CampanyName'", "Xt_SystemParameter", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | //{ |
| | | // MessageBox.Show("è·åç³»ç»åæ°å¤±è´¥ï¼åå :" + DBUtility.ClsPub.sExeReturnInfo, "æç¤º"); |
| | | // return; |
| | | //} |
| | | //else |
| | | //{ |
| | | // CampanyName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HValue"]); |
| | | //} |
| | | //if (CampanyName == "å¯è´å¥ç¹") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | //{ |
| | | |
| | | } |
| | | else |
| | | { |
| | | //è·åå½åæ¹çäº§è®¢å æå¤§æµè½¬å¡å·ï¼å¹¶ç´¯è®¡å¢å 1ã |
| | | //æºè§åå·- å¹´ææ¥20200701+001 |
| | | string sOldNo = ""; |
| | | //Ds = oCn.RunProcReturn("select top 1 HBillNo from Sc_ProcessExchangeBillmain where hicmointerid=" + oTable.Rows[row]["hmainid"].ToString() + " order by LEN(HBillno) desc, HbillNo desc ", "Sc_ProcessExchangeBillmain"); |
| | | //} |
| | | //else |
| | | //{ |
| | | // //è·åå½åæ¹çäº§è®¢å æå¤§æµè½¬å¡å·ï¼å¹¶ç´¯è®¡å¢å 1ã |
| | | // //æºè§åå·- å¹´ææ¥20200701+001 |
| | | // string sOldNo = ""; |
| | | // //Ds = oCn.RunProcReturn("select top 1 HBillNo from Sc_ProcessExchangeBillmain where hicmointerid=" + oTable.Rows[row]["hmainid"].ToString() + " order by LEN(HBillno) desc, HbillNo desc ", "Sc_ProcessExchangeBillmain"); |
| | | |
| | | Ds = oCn.RunProcReturn("select top 1 HBillNo from Sc_ProcessExchangeBillmain where HDate='" + dtpHDate.Value.ToShortDateString() + "' and HBillSubType<>'Split' order by HbillNo desc ", "Sc_ProcessExchangeBillmain"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sNo = "001"; |
| | | } |
| | | else |
| | | { |
| | | sOldNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillNo"]); |
| | | sOldNo = sOldNo.Substring(sOldNo.Length - 3, 3); |
| | | //if (sOldNo.Substring(0, 1) == "0" || sOldNo.Substring(0, 1) == "-") |
| | | //{ |
| | | // sOldNo = sOldNo.Substring(sOldNo.Length - 2, 2); |
| | | // if (sOldNo.Substring(0, 1) == "0") |
| | | // { |
| | | // sOldNo = sOldNo.Substring(sOldNo.Length - 1, 1); |
| | | // } |
| | | //} |
| | | sNo = "0000" + DBUtility.ClsPub.isStrNull(DBUtility.ClsPub.isLong(sOldNo) + 1); |
| | | } |
| | | // Ds = oCn.RunProcReturn("select top 1 HBillNo from Sc_ProcessExchangeBillmain where HDate='" + dtpHDate.Value.ToShortDateString() + "' and HBillSubType<>'Split' order by HbillNo desc ", "Sc_ProcessExchangeBillmain"); |
| | | // if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | // { |
| | | // sNo = "001"; |
| | | // } |
| | | // else |
| | | // { |
| | | // sOldNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillNo"]); |
| | | // sOldNo = sOldNo.Substring(sOldNo.Length - 3, 3); |
| | | // //if (sOldNo.Substring(0, 1) == "0" || sOldNo.Substring(0, 1) == "-") |
| | | // //{ |
| | | // // sOldNo = sOldNo.Substring(sOldNo.Length - 2, 2); |
| | | // // if (sOldNo.Substring(0, 1) == "0") |
| | | // // { |
| | | // // sOldNo = sOldNo.Substring(sOldNo.Length - 1, 1); |
| | | // // } |
| | | // //} |
| | | // sNo = "0000" + DBUtility.ClsPub.isStrNull(DBUtility.ClsPub.isLong(sOldNo) + 1); |
| | | // } |
| | | |
| | | sNo = sNo.Substring(sNo.Length - 3, 3); |
| | | //initGrid(); |
| | | //initGrid_Sub(); |
| | | //string sBillNo = oTable.Rows[row]["ç产订åå·"].ToString(); |
| | | string sYear = dtpHDate.Value.Year.ToString(); |
| | | string sMonth = "00" + dtpHDate.Value.Month.ToString(); |
| | | string sDay = "00" + dtpHDate.Value.Day.ToString(); |
| | | string sBillNo = sYear + sMonth.Substring(sMonth.Length - 2, 2) + sDay.Substring(sDay.Length - 2, 2); |
| | | //sBillNo = sBillNo.Replace("WORKX", ""); |
| | | //sBillNo = sBillNo.Replace("WORK", ""); |
| | | //sBillNo = sBillNo.Replace("_", "-"); |
| | | sBillNo = sBillNo + "-" + sNo; |
| | | txtHBillNo.Text = sBillNo; |
| | | } |
| | | // sNo = sNo.Substring(sNo.Length - 3, 3); |
| | | // //initGrid(); |
| | | // //initGrid_Sub(); |
| | | // //string sBillNo = oTable.Rows[row]["ç产订åå·"].ToString(); |
| | | // string sYear = dtpHDate.Value.Year.ToString(); |
| | | // string sMonth = "00" + dtpHDate.Value.Month.ToString(); |
| | | // string sDay = "00" + dtpHDate.Value.Day.ToString(); |
| | | // string sBillNo = sYear + sMonth.Substring(sMonth.Length - 2, 2) + sDay.Substring(sDay.Length - 2, 2); |
| | | // //sBillNo = sBillNo.Replace("WORKX", ""); |
| | | // //sBillNo = sBillNo.Replace("WORK", ""); |
| | | // //sBillNo = sBillNo.Replace("_", "-"); |
| | | // sBillNo = sBillNo + "-" + sNo; |
| | | // txtHBillNo.Text = sBillNo; |
| | | //} |
| | | |
| | | |
| | | |
| | |
| | | grdMain.Rows[i].Cells[HMaxQtyCol].Value = oTable.Rows[i]["æé«ä¸é"].ToString(); |
| | | grdMain.Rows[i].Cells[HMouldNoCol].Value = oTable.Rows[i]["模å
·ç¼å·"].ToString(); |
| | | grdMain.Rows[i].Cells[HProcWorkNumCol].Value = oTable.Rows[i]["ç¨åºå·"].ToString(); |
| | | grdMain.Rows[i].Cells[HSNCtrlCol].Value = oTable.Rows[i]["SNç è¿ç«"].ToString(); |
| | | } |
| | | |
| | | Sub_CountProcExchQty(); |