1
wtt
2024-09-20 0cea6e03005f037daf85354d6708b50f5b6e912b
WarM/ÌõÂë´òÓ¡/Gy_CusBarCodeBill_KaiBei_LangChao.cs
@@ -589,9 +589,9 @@
                    }
                    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) == "")
                        {
@@ -712,6 +712,39 @@
                {
                    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);
                        //获取最大流水号
@@ -1076,12 +1109,12 @@
            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();
@@ -1506,9 +1539,9 @@
                                "," + 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;