| | |
| | | InitializeComponent(); |
| | | } |
| | | |
| | | public int HMaterNumberCol = 0; //产å代ç |
| | | public int HProcNoCol = 0; //å·¥åºåºå· |
| | | public int HProcNameCol = 0; //å·¥åº |
| | | public int HWorkCenterNameCol = 0; //å·¥ä½ä¸å¿ |
| | | public int HWorkQtyCol = 0; //å å·¥æ°é |
| | | public int HBeginDayQtyCol = 6; //å¼å·¥åºå¤© |
| | | public int HBeginFixQtyCol = 7; //å¼å·¥ä½é |
| | | public int HFixPriceCol = 8; //å®é¢ å°æ¶å·¥èµ |
| | | public int HProcPriceCol = 9; //工价 |
| | | public int HTechnologyParameterCol = 0; //å·¥èºåæ° |
| | | public int HPicNumCol = 0; //å¾çº¸ç¼å· |
| | | public int HProcCheckNoteCol = 0; //æ¬å·¥åºç¡®è®¤è®°å½ |
| | | public int HMaterNumberCol = 0; //??????? |
| | | public int HProcNoCol = 0; //??????? |
| | | public int HProcNameCol = 0; //???? |
| | | public int HWorkCenterNameCol = 0; //???????? |
| | | public int HWorkQtyCol = 0; //??????? |
| | | public int HBeginDayQtyCol = 6; //???????? |
| | | public int HBeginFixQtyCol = 7; //???????? |
| | | public int HFixPriceCol = 8; //???? С????? |
| | | public int HProcPriceCol = 9; //???? |
| | | public int HTechnologyParameterCol = 0; //??????? |
| | | public int HPicNumCol = 0; //????? |
| | | public int HProcCheckNoteCol = 0; //??????????? |
| | | |
| | | public int HPicNumVerCol = 0; //å¾å·çæ¬ |
| | | public int HPicNumAssembleCol = 0; //æ»è£
å¾å· |
| | | public int HMaterTextureCol = 0; //æè´¨ |
| | | public int HProductNumCol = 0; //æåç¼å· |
| | | public int HVerNumCol = 0; //çæ¬ |
| | | public int HMouldNoCol = 0; //模å
·ç¼å· |
| | | public int HProcWorkNumCol = 0; //ç¨åºå· |
| | | public int HPassRateCol = 0; //è¯ç |
| | | public int HPicNumVerCol = 0; //???æ±¾ |
| | | public int HPicNumAssembleCol = 0; //?????? |
| | | public int HMaterTextureCol = 0; //???? |
| | | public int HProductNumCol = 0; //?????? |
| | | public int HVerNumCol = 0; //?æ±¾ |
| | | public int HMouldNoCol = 0; //????? |
| | | public int HProcWorkNumCol = 0; //????? |
| | | public int HPassRateCol = 0; //???? |
| | | // |
| | | public const int HBeginRow = 2; //æææ°æ®ï¼å¼å§è¡æ° |
| | | public const int HBeginRow = 2; //??Ч???????????? |
| | | // |
| | | public DAL.ClsGy_Process_View oProcHlp = new DAL.ClsGy_Process_View(); |
| | | DAL.ClsGy_WorkCenter_View oCenHlp = new DAL.ClsGy_WorkCenter_View(); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åå§åçé¢ |
| | | /// ????????? |
| | | /// </summary> |
| | | public override void initData() |
| | | { |
| | |
| | | base.ModRightNameEdit = base.ModRightName + base.ModRightNameEdit; |
| | | base.ModRightNameMoney = base.ModRightName + base.ModRightNameMoney; |
| | | base.ModRightNameQty = base.ModRightName + base.ModRightNameQty; |
| | | base.ModCaption = "å·¥èºè·¯çº¿å¯¼å
¥"; |
| | | base.ModCaption = "????·?????"; |
| | | this.Text = base.ModCaption; |
| | | lblCaption.Text = base.ModCaption; |
| | | // |
| | |
| | | DBUtility.Gy_BaseFun.SetComboxPeriod(cmbHPeriod); |
| | | // |
| | | } |
| | | //导å
¥ |
| | | //???? |
| | | public override void Sub_DataIn() |
| | | { |
| | | try |
| | |
| | | string hnumber = ""; |
| | | string HBillNo = ""; |
| | | // |
| | | HMaterNumberCol = DBUtility.Gy_BaseFun.Fun_GetCol("产å代ç ", grdMain); |
| | | HProcNoCol = DBUtility.Gy_BaseFun.Fun_GetCol("å·¥åºåºå·", grdMain); |
| | | HProcNameCol = DBUtility.Gy_BaseFun.Fun_GetCol("å·¥åº", grdMain); |
| | | HWorkCenterNameCol = DBUtility.Gy_BaseFun.Fun_GetCol("å·¥ä½ä¸å¿", grdMain); |
| | | HWorkQtyCol = DBUtility.Gy_BaseFun.Fun_GetCol("å å·¥æ°é", grdMain); |
| | | HPicNumCol = DBUtility.Gy_BaseFun.Fun_GetCol("å¾çº¸ç¼å·", grdMain); |
| | | HTechnologyParameterCol = DBUtility.Gy_BaseFun.Fun_GetCol("å·¥èºåæ°", grdMain); |
| | | HProcCheckNoteCol = DBUtility.Gy_BaseFun.Fun_GetCol("æ¬å·¥åºç¡®è®¤è®°å½", grdMain); |
| | | HPicNumVerCol = DBUtility.Gy_BaseFun.Fun_GetCol("å¾å·çæ¬", grdMain); |
| | | HPicNumAssembleCol = DBUtility.Gy_BaseFun.Fun_GetCol("æ»è£
å¾å·", grdMain); |
| | | HMaterTextureCol = DBUtility.Gy_BaseFun.Fun_GetCol("æè´¨", grdMain); |
| | | HProductNumCol = DBUtility.Gy_BaseFun.Fun_GetCol("æåç¼å·", grdMain); |
| | | HVerNumCol = DBUtility.Gy_BaseFun.Fun_GetCol("çæ¬", grdMain); |
| | | HMouldNoCol = DBUtility.Gy_BaseFun.Fun_GetCol("模å
·ç¼å·", grdMain); |
| | | HProcWorkNumCol = DBUtility.Gy_BaseFun.Fun_GetCol("ç¨åºå·", grdMain); |
| | | HBeginFixQtyCol = DBUtility.Gy_BaseFun.Fun_GetCol("å¼å·¥ä½é", grdMain); |
| | | HBeginDayQtyCol = DBUtility.Gy_BaseFun.Fun_GetCol("å¼å·¥åºå¤©", grdMain); |
| | | HFixPriceCol = DBUtility.Gy_BaseFun.Fun_GetCol("å°æ¶å·¥èµ", grdMain); |
| | | HProcPriceCol = DBUtility.Gy_BaseFun.Fun_GetCol("å个工价", grdMain); |
| | | HPassRateCol = DBUtility.Gy_BaseFun.Fun_GetCol("è¯ç", grdMain); |
| | | HMaterNumberCol = DBUtility.Gy_BaseFun.Fun_GetCol("???????", grdMain); |
| | | HProcNoCol = DBUtility.Gy_BaseFun.Fun_GetCol("???????", grdMain); |
| | | HProcNameCol = DBUtility.Gy_BaseFun.Fun_GetCol("????", grdMain); |
| | | HWorkCenterNameCol = DBUtility.Gy_BaseFun.Fun_GetCol("????????", grdMain); |
| | | HWorkQtyCol = DBUtility.Gy_BaseFun.Fun_GetCol("???????", grdMain); |
| | | HPicNumCol = DBUtility.Gy_BaseFun.Fun_GetCol("?????", grdMain); |
| | | HTechnologyParameterCol = DBUtility.Gy_BaseFun.Fun_GetCol("???????", grdMain); |
| | | HProcCheckNoteCol = DBUtility.Gy_BaseFun.Fun_GetCol("???????????", grdMain); |
| | | HPicNumVerCol = DBUtility.Gy_BaseFun.Fun_GetCol("???æ±¾", grdMain); |
| | | HPicNumAssembleCol = DBUtility.Gy_BaseFun.Fun_GetCol("??????", grdMain); |
| | | HMaterTextureCol = DBUtility.Gy_BaseFun.Fun_GetCol("????", grdMain); |
| | | HProductNumCol = DBUtility.Gy_BaseFun.Fun_GetCol("??????", grdMain); |
| | | HVerNumCol = DBUtility.Gy_BaseFun.Fun_GetCol("?æ±¾", grdMain); |
| | | HMouldNoCol = DBUtility.Gy_BaseFun.Fun_GetCol("?????", grdMain); |
| | | HProcWorkNumCol = DBUtility.Gy_BaseFun.Fun_GetCol("?????", grdMain); |
| | | HBeginFixQtyCol = DBUtility.Gy_BaseFun.Fun_GetCol("????????", grdMain); |
| | | HBeginDayQtyCol = DBUtility.Gy_BaseFun.Fun_GetCol("????????", grdMain); |
| | | HFixPriceCol = DBUtility.Gy_BaseFun.Fun_GetCol("С?????", grdMain); |
| | | HProcPriceCol = DBUtility.Gy_BaseFun.Fun_GetCol("????????", grdMain); |
| | | HPassRateCol = DBUtility.Gy_BaseFun.Fun_GetCol("????", grdMain); |
| | | |
| | | //æ²¡ææ¾å°å |
| | | if (HMaterNumberCol == -1) |
| | |
| | | |
| | | if (hnumber == DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HMaterNumberCol].Value)) |
| | | { |
| | | //å¾å°ç©æå
ç |
| | | //??????????? |
| | | if (oMaterHlp.GetInfoByNumber(sHNumber)) |
| | | { |
| | | if (BillNew.omodel.HMaterID != oMaterHlp.omodel.HItemID) |
| | |
| | | else |
| | | { |
| | | BillNew.omodel.HMaterID = 0; |
| | | MessageBox.Show("第" + i.ToString() + "è¡," + sHNumber + "æ²¡ææ¾å°å¯¹åºçç©æï¼"); |
| | | MessageBox.Show("??" + i.ToString() + "??," + sHNumber + "????????????????"); |
| | | return; |
| | | } |
| | | j++; |
| | | //åå
¥ç±» |
| | | //д???? |
| | | WriteClass(i); |
| | | |
| | | } |
| | |
| | | DataSet Ds; |
| | | ClsCN oCn = new ClsCN(); |
| | | bool b = false; |
| | | // 夿æ¯å¦åå¨å·¥èºè·¯çº¿ |
| | | // ?ж??????????·?? |
| | | Ds = oCn.RunProcReturn("Select HMaterID from Gy_RoutingBillMain Where HMaterID=" + BillNew.omodel.HMaterID.ToString(), "Gy_RoutingBillMain"); |
| | | if (checkadd.Checked == true) |
| | | { |
| | | //if (Ds.Tables[0].Rows.Count == 0)//追å |
| | | //if (Ds.Tables[0].Rows.Count == 0)//??? |
| | | //{ |
| | | //æ°å¢å å
å é¤åæ¥å·¥èº |
| | | //????? ???????????? |
| | | BillNew.DeleteByMaterID(BillNew.omodel.HMaterID); |
| | | b = BillNew.AddBill(ref ClsPub.sExeReturnInfo); |
| | | if (b == false) |
| | | { |
| | | MessageBox.Show("第" + i.ToString() + "è¡,ç©æ" + BillNew.omodel.HMaterNumber + "æ°å¢å·¥èºè·¯çº¿å¤±è´¥ï¼ä»£ç 293è¡ä¸ï¼åå ï¼" + ClsPub.sExeReturnInfo); |
| | | MessageBox.Show("??" + i.ToString() + "??,????" + BillNew.omodel.HMaterNumber + "????????·??????????293???У????" + ClsPub.sExeReturnInfo); |
| | | return; |
| | | } |
| | | c++; |
| | |
| | | hnumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HMaterNumberCol].Value); |
| | | sHNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HMaterNumberCol].Value); |
| | | |
| | | //å®¡æ ¸ä»£ç æ¯å¦åç |
| | | //???????????? |
| | | if (!DBUtility.ClsPub.AllowNumber(sHNumber)) |
| | | { |
| | | MessageBox.Show("ç©æä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼", "æç¤º"); |
| | | MessageBox.Show("????????в????????????.????????λ?λ???????.????", "???"); |
| | | return; |
| | | } |
| | | //å¾å°ç©æå
ç |
| | | //??????????? |
| | | if (oMaterHlp.GetInfoByNumber(sHNumber)) |
| | | { |
| | | if (BillNew.omodel.HMaterID != oMaterHlp.omodel.HItemID) |
| | |
| | | } |
| | | } |
| | | |
| | | //åå
¥ç±» 仿§ä»¶ |
| | | //д???? ???? |
| | | private bool WriteClass(int row) |
| | | { |
| | | string sHNumber = ""; |
| | |
| | | sBeginDayQty = DBUtility.ClsPub.isSingle(grdMain.Rows[row].Cells[HBeginDayQtyCol].Value); |
| | | sBeginFixQty = DBUtility.ClsPub.isSingle(grdMain.Rows[row].Cells[HBeginFixQtyCol].Value); |
| | | sHPassRate = DBUtility.ClsPub.isSingle(grdMain.Rows[row].Cells[HPassRateCol].Value); |
| | | //夿æ¯å¦å
许 ä¿å |
| | | //?ж???????? ???? |
| | | |
| | | Model.ClsGy_RoutingBillSub oSub = new Model.ClsGy_RoutingBillSub(); |
| | | |
| | | //å¾å°å·¥åºå
ç |
| | | //??????????? |
| | | if (oProcHlp.GetInfoByName(sHNamePoc)) |
| | | { |
| | | oSub.HProcID = oProcHlp.omodel.HItemID; |
| | | } |
| | | |
| | | //å¾å°è½¦é´å
ç |
| | | //??????????? |
| | | if (oCenHlp.GetInfoByName(sHNumberCen)) |
| | | { |
| | | oSub.HCenterID = oCenHlp.omodel.HItemID; |
| | | } |
| | | //åå
¥ä¿¡æ¯ |
| | | //д????? |
| | | oSub.HEntryID = j; |
| | | |
| | | oSub.HProcNo = DBUtility.ClsPub.isInt(grdMain.Rows[row].Cells[HProcNoCol].Value); |
| | |
| | | oSub.HWorkQty = sWorkQty; |
| | | oSub.HPassRate = sHPassRate; |
| | | oSub.HRemark = ""; |
| | | oSub.HTimeUnit = "Сʱ"; |
| | | oSub.HTimeUnit = "С?"; |
| | | oSub.HReadyTime = 0; |
| | | oSub.HQueueTime = 0; |
| | | oSub.HMoveTime = 0; |
| | |
| | | return true; |
| | | } |
| | | |
| | | //æ£æ¥ç©æ |
| | | //??????? |
| | | private bool Checkdata() |
| | | { |
| | | bool b = false; |
| | |
| | | { |
| | | // |
| | | int index = i + 1; |
| | | //å å·¥æ°éä¸è½å°äºçäºé¶ |
| | | //???????????С??????? |
| | | if (sWorkQty <= 0) |
| | | { |
| | | MessageBox.Show("第" + index + "è¡å å·¥æ°éä¸è½å°äºçäºé¶ï¼", "æç¤º"); |
| | | MessageBox.Show("??" + index + "?м??????????С???????", "???"); |
| | | return false; |
| | | } |
| | | //è¯çä¸è½å°äºçäºé¶ |
| | | //???????С??????? |
| | | if (sHPassRate <= 0) |
| | | { |
| | | MessageBox.Show("第" + index + "è¡è¯çä¸è½å°äºçäºé¶ï¼", "æç¤º"); |
| | | MessageBox.Show("??" + index + "?????????С???????", "???"); |
| | | return false; |
| | | } |
| | | //å®¡æ ¸ä»£ç æ¯å¦åç |
| | | //???????????? |
| | | if (!DBUtility.ClsPub.AllowNumber(sHNumber)) |
| | | { |
| | | MessageBox.Show("ç©æä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼", "æç¤º"); |
| | | MessageBox.Show("????????в????????????.????????λ?λ???????.????", "???"); |
| | | return false; |
| | | } |
| | | //å¾å°ç©æå
ç |
| | | //??????????? |
| | | int j = i + HBeginRow; |
| | | if (!oMaterHlp.GetInfoByNumber(sHNumber)) |
| | | { |
| | | sMsg = "[" + sHNumber + "]ç©æä¸åå¨"; |
| | | sMsg = "[" + sHNumber + "]?????????"; |
| | | if (sErrMsg.Contains(sMsg) == false) |
| | | { |
| | | sErrMsg = sErrMsg + "[" + sHNumber + "]ç©æä¸åå¨\r\n"; |
| | | sErrMsg = sErrMsg + "[" + sHNumber + "]?????????\r\n"; |
| | | } |
| | | b = true; |
| | | } |
| | | //å¾å°å·¥åºå
ç |
| | | //??????????? |
| | | if (!oProcHlp.GetInfoByName(sHNamePoc)) |
| | | { |
| | | sMsg = "[" + sHNamePoc + "]å·¥åºä¸åå¨"; |
| | | sMsg = "[" + sHNamePoc + "]????????"; |
| | | if (sErrMsg.Contains(sMsg) == false) |
| | | { |
| | | sErrMsg = sErrMsg + "[" + sHNamePoc + "]å·¥åºä¸åå¨\r\n"; |
| | | sErrMsg = sErrMsg + "[" + sHNamePoc + "]????????\r\n"; |
| | | } |
| | | b = true; |
| | | } |
| | | |
| | | //å¾å°å·¥ä½ä¸å¿å
ç |
| | | //??????????????? |
| | | if (!oCenHlp.GetInfoByName(sHNumberCen)) |
| | | { |
| | | sMsg = "[" + sHNumberCen + "]å·¥ä½ä¸å¿ä¸åå¨"; |
| | | sMsg = "[" + sHNumberCen + "]?????????????"; |
| | | if (sErrMsg.Contains(sMsg) == false) |
| | | { |
| | | sErrMsg = sErrMsg + "[" + sHNumberCen + "]å·¥ä½ä¸å¿ä¸åå¨\r\n"; |
| | | sErrMsg = sErrMsg + "[" + sHNumberCen + "]?????????????\r\n"; |
| | | } |
| | | b = true; |
| | | |