| | |
| | | } |
| | | else |
| | | { |
| | | grdMain.Rows[j].Cells[HBaNoCol].Value = HCode2; |
| | | grdMain.Rows[j].Cells[HBatchNoCol].Value = DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HBatchNo"]); |
| | | grdMain.Rows[j].Cells[HCode2Col].Value = DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HCode2"]); |
| | | //grdMain.Rows[j].Cells[HBaNoCol].Value = HCode2; |
| | | //grdMain.Rows[j].Cells[HBatchNoCol].Value = DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HBatchNo"]); |
| | | //grdMain.Rows[j].Cells[HCode2Col].Value = DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HCode2"]); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HExpiryDateCol].Value) == "") |
| | | { |
| | |
| | | { |
| | | if (ClsPub.isLong(grdMain.Rows[j].Cells[HMaterIDCol].Value) != 0) |
| | | { |
| | | string sHSourceBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HBillNoCol].Value); // æºååå· |
| | | long sHMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[j].Cells[HMaterIDCol].Value); // ç©æå
ç |
| | | string sHMaterNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterNumberCol].Value); // ç©æä»£ç |
| | | string sHCusModelName = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCusModelNameCol].Value); // å®¢æ·æå· |
| | | string sHCode1 = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode1Col].Value); // ç©æç±»å« |
| | | string sHCode2 = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode2Col].Value); // æ¹æ¬¡ä½ |
| | | sHCode2 = sHCode2.ToUpper(); |
| | | string HBatchNoNumber = sHCode1 + sYear + sPeriod + sDay + HCusModel; // æ¹æ¬¡çæåç¼ |
| | | HBatchNoNumber = HBatchNoNumber.ToUpper(); |
| | | |
| | | DataSet oDsBatchNo = oCn.RunProcReturn("exec h_p_Gy_CusBarCodeBill_KaiBeiLC_GetBatchNo '" + sHSourceBillNo + "'," + sHMaterID.ToString() + ",'" + sHMaterNumber + "','" + sHCusModelName + "','" + sHCode2 + "','" + HBatchNoNumber + "'", "h_p_Gy_CusBarCodeBill_KaiBeiLC_GetBatchNo"); |
| | | // |
| | | if (oDsBatchNo == null && oDsBatchNo.Tables[0].Rows.Count == 0) |
| | | { |
| | | MessageBox.Show("è·åæ¹æ¬¡å¤±è´¥ï¼"); |
| | | bc.Enabled = true; |
| | | oCn.RollBack(); |
| | | return; |
| | | } |
| | | else if (DBUtility.ClsPub.isStrNull(oDsBatchNo.Tables[0].Rows[0][0]) == "1") |
| | | { |
| | | MessageBox.Show(DBUtility.ClsPub.isStrNull(oDsBatchNo.Tables[0].Rows[0]["HRemark"])); |
| | | bc.Enabled = true; |
| | | oCn.RollBack(); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | grdMain.Rows[j].Cells[HBaNoCol].Value = sHCode2; |
| | | grdMain.Rows[j].Cells[HBatchNoCol].Value = DBUtility.ClsPub.isStrNull(oDsBatchNo.Tables[0].Rows[0]["HBatchNo"]); |
| | | grdMain.Rows[j].Cells[HCode2Col].Value = DBUtility.ClsPub.isStrNull(oDsBatchNo.Tables[0].Rows[0]["HCode2"]); |
| | | } |
| | | |
| | | HBatchNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HBatchNoCol].Value); |
| | | HCode3 = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode3Col].Value); |
| | | //è·åæå¤§æµæ°´å· |
| | |
| | | string sAllowCol = HQtyCol.ToString()+ |
| | | "," + HMinQtyCol.ToString() + |
| | | "," + HWMinQtyCol.ToString() + |
| | | "," + HMaterNumberCol.ToString() + |
| | | //"," + HMaterNumberCol.ToString() + |
| | | "," + HAuxPropNumberCol.ToString() + |
| | | "," + HUnitNumberCol.ToString() + |
| | | "," + HCode1Col.ToString() + |
| | | //"," + HCode1Col.ToString() + |
| | | //"," + HCode2Col.ToString() + |
| | | "," + HCode3Col.ToString() + |
| | | //"," + HCode3Col.ToString() + |
| | | "," + HInnerBillNoCol.ToString() + |
| | | "," + HRemarkCol.ToString(); |
| | | |
| | |
| | | "," + HMinQtyCol.ToString() + |
| | | "," + HWMinQtyCol.ToString() + |
| | | "," + HAuxPropNumberCol.ToString() + |
| | | "," + HCode1Col.ToString() + |
| | | //"," + HCode1Col.ToString() + |
| | | //"," + HCode2Col.ToString() + |
| | | "," + HCode3Col.ToString() + |
| | | //"," + HCode3Col.ToString() + |
| | | "," + HInnerBillNoCol.ToString() + |
| | | "," + HRemarkCol.ToString(); |
| | | grdMain.Columns[HBillNoCol].ReadOnly = true; |