| | |
| | | public int HStdWorkTimes = 0; //æ åå·¥æ¶ |
| | | public int HUpperlimit = 0; //ä¸éæ¯ä¾ |
| | | public int HLowerlimit = 0; //ä¸éæ¯ä¾ |
| | | public int HStdPiece = 0; //ä¸éæ¯ä¾ |
| | | public int HStdPric = 0; //ä¸éæ¯ä¾ |
| | | // |
| | | public const int HBeginRow = 2; //æææ°æ®ï¼å¼å§è¡æ° |
| | | |
| | |
| | | int sHMaterNameCol = DBUtility.Gy_BaseFun.Fun_GetCol("ç©æ", grdMain); |
| | | int sHUpperlimitCol = DBUtility.Gy_BaseFun.Fun_GetCol("ä¸çº¿æ¯ä¾", grdMain); |
| | | int sHLowerlimitCol = DBUtility.Gy_BaseFun.Fun_GetCol("ä¸çº¿æ¯ä¾", grdMain); |
| | | int sHStdPieceCol = DBUtility.Gy_BaseFun.Fun_GetCol("æ å计件", grdMain); |
| | | int sHStdPricCol = DBUtility.Gy_BaseFun.Fun_GetCol("æ å计价", grdMain); |
| | | int sHUSEORGNameCol = DBUtility.Gy_BaseFun.Fun_GetCol("ç»ç»", grdMain); |
| | | int sHMakerCol = DBUtility.Gy_BaseFun.Fun_GetCol("å¶å人", grdMain); |
| | | int sHMakeDateCol = DBUtility.Gy_BaseFun.Fun_GetCol("å¶åæ¥æ", grdMain); |
| | | |
| | | for (int i = 0; i <= grdMain.Rows.Count - 1; i++) |
| | | { |
| | | if (DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[sHMaterNumCol].Value) != "" && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[sHProcNumCol].Value) != "") |
| | | if (DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[sHMaterNumCol].Value) != "" && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[sHProcNumCol].Value) != ""&& DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[sHStdWorkTimesCol].Value) != "") |
| | | { |
| | | //åå
¥ç±» |
| | | if (WriteClass(i)) |
| | | if (DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[sHStdWorkTimesCol].Value)>0&& DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[sHUpperlimitCol].Value) > 0&& DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[sHLowerlimitCol].Value) > 0) |
| | | { |
| | | //ä¿åè®°å½ |
| | | if (!BillNew.AddNew()) |
| | | //åå
¥ç±» |
| | | if (WriteClass(i)) |
| | | { |
| | | MessageBox.Show("导å
¥å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo, "æç¤º"); |
| | | return; |
| | | //ä¿åè®°å½ |
| | | if (!BillNew.AddNew()) |
| | | { |
| | | MessageBox.Show("导å
¥å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo, "æç¤º"); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("第" + (i + 1) + "è¡,æ åå·¥æ¶ãä¸éæ¯ä¾åä¸éæ¯ä¾ä¸è½å°äº0", "æç¤º"); |
| | | return; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("å·¥åºä»£ç æç©æä»£ç 为空!åå :" + DBUtility.ClsPub.sExeReturnInfo, "æç¤º"); |
| | | MessageBox.Show("第"+(i+1)+"è¡,å·¥åºä»£ç ãç©æä»£ç åæ åå·¥æ¶ä¸è½ä¸ºç©º!åå :" + DBUtility.ClsPub.sExeReturnInfo, "æç¤º"); |
| | | return; |
| | | } |
| | | } |
| | |
| | | double sStdWorkTimes = 0; |
| | | double sUpperlimit = 0; |
| | | double sLowerlimit = 0; |
| | | double sStdPiece = 0; |
| | | double sStdPric= 0; |
| | | int sUSEORGName = 0; |
| | | DateTime sHMakeDate = DateTime.Today.Date; |
| | | string sHMaker = DBUtility.ClsPub.CurUserName; |
| | |
| | | int sHMaterNameCol = DBUtility.Gy_BaseFun.Fun_GetCol("ç©æ", grdMain); |
| | | int sHUpperlimitCol = DBUtility.Gy_BaseFun.Fun_GetCol("ä¸çº¿æ¯ä¾", grdMain); |
| | | int sHLowerlimitCol = DBUtility.Gy_BaseFun.Fun_GetCol("ä¸çº¿æ¯ä¾", grdMain); |
| | | int sHStdPieceCol = DBUtility.Gy_BaseFun.Fun_GetCol("æ å计件", grdMain); |
| | | int sHStdPricCol = DBUtility.Gy_BaseFun.Fun_GetCol("æ å计价", grdMain); |
| | | int sHUSEORGNameCol = DBUtility.Gy_BaseFun.Fun_GetCol("ç»ç»", grdMain); |
| | | int sHMakerCol = DBUtility.Gy_BaseFun.Fun_GetCol("å¶å人", grdMain); |
| | | int sHMakeDateCol = DBUtility.Gy_BaseFun.Fun_GetCol("å¶åæ¥æ", grdMain); |
| | |
| | | sStdWorkTimes = DBUtility.ClsPub.isDoule(grdMain.Rows[row].Cells[sHStdWorkTimesCol].Value); |
| | | sUpperlimit = DBUtility.ClsPub.isDoule(grdMain.Rows[row].Cells[sHUpperlimitCol].Value); |
| | | sLowerlimit = DBUtility.ClsPub.isDoule(grdMain.Rows[row].Cells[sHLowerlimitCol].Value); |
| | | sStdPiece = DBUtility.ClsPub.isDoule(grdMain.Rows[row].Cells[sHStdPieceCol].Value); |
| | | sStdPric = DBUtility.ClsPub.isDoule(grdMain.Rows[row].Cells[sHStdPricCol].Value); |
| | | //sUSEORGName = DBUtility.ClsPub.isInt(grdMain.Rows[row].Cells[sHUSEORGNameCol].Value); |
| | | //sHMakeDate = DBUtility.ClsPub.isDate(grdMain.Rows[row].Cells[sHMakeDateCol].Value); |
| | | //sHMaker = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[sHMakerCol].Value); |
| | | |
| | | //夿æ¯å¦å
许 ä¿å |
| | | |
| | | //å®¡æ ¸ä»£ç æ¯å¦åç |
| | | if (!DBUtility.ClsPub.AllowNumber(sMaterNumber)) |
| | | { |
| | |
| | | oSub.HStdWorkTimes = sStdWorkTimes; |
| | | oSub.HUpperlimit = sUpperlimit; |
| | | oSub.HLowerlimit = sLowerlimit; |
| | | oSub.HStdPiece = sStdPiece; |
| | | oSub.HStdPric = sStdPric; |
| | | oSub.HUSEORGID = DBUtility.ClsPub.HOrgID; |
| | | oSub.HMaker = DBUtility.ClsPub.CurUserName; |
| | | oSub.HMakeDate = DateTime.Today.ToShortDateString(); |