yangle
2022-10-18 36ac7452cd5345809df4fe27f24ea83f70cd0919
WarM/ÌõÂë´òÓ¡/Sc_ICMOToBarCode.cs
@@ -752,7 +752,6 @@
        private void cmdHSaveBill_Click(object sender, EventArgs e)
        {
            Display();
        }
@@ -875,17 +874,32 @@
                long HTMaterID = 0;
                HTMaterID = ClsPub.isLong(grdMain.Rows[0].Cells[Fun_GetCol("HMaterID")].Value);
                string sPackStr = "ZXM" + HYear + HPeriod + HDay + HTMaterID; //外箱码 å‰ç¼€
                //获取处理过的日期跟今天差几天  ç„¶åŽåŠ å‡ ä¸ª+号
                TimeSpan HCY = Convert.ToDateTime(HPrdDate) - Convert.ToDateTime(DateTime.Now.ToString());
                int a = 1;
                while (a <= HCY.Days)  //当a å°äºŽ å·®å¼‚天数  å¾ªçŽ¯åŠ ä¸Š + å·
                {
                    HPrdDate = HPrdDate + "+";
                    a = a + 1;
                }
                DataSet DsTM = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sPackStr + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号                                                                                          //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
                Int64 TTM_LSH = ClsPub.isInt(DsTM.Tables[0].Rows[0][0]) + 1;
                DataSet DSet3 = oCn.RunProcReturn("select * from Gy_FactoryDayOff Where HFactoryDayOffDate='" + HDate1.ToString() + "'", "Gy_FactoryDayOff", ref DBUtility.ClsPub.sExeReturnInfo);
                if (DSet3 == null || DSet3.Tables[0].Rows.Count == 0)
                {
                    sPackBarCode = sPackStr + TTM_LSH.ToString() ;
                }
                else
                {
                    sPackBarCode = sPackStr + TTM_LSH.ToString() + "+";
                }
                sPackBarCode = sPackStr + TTM_LSH.ToString();
                //DataSet DSet3 = oCn.RunProcReturn("select * from Gy_FactoryDayOff Where HFactoryDayOffDate='" + HDate1.ToString() + "'", "Gy_FactoryDayOff", ref DBUtility.ClsPub.sExeReturnInfo);
                //if (DSet3 == null || DSet3.Tables[0].Rows.Count == 0)
                //{
                //    sPackBarCode = sPackStr + TTM_LSH.ToString() ;
                //}
                //else
                //{
                //    sPackBarCode = sPackStr + TTM_LSH.ToString() + "+";
                //}
                oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sPackStr + "'");
@@ -978,7 +992,7 @@
                        HJT = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[Fun_GetCol("设备")].Value);
                        HXH = HYear + HPeriod + HDay + HBC + HJT + HMaterNumber;
                        Ds99 = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HXH + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                        LSH3 = ClsPub.isInt(Ds99.Tables[0].Rows[0][0]);
                        LSH3 = ClsPub.isInt(Ds99.Tables[0].Rows[0][0]) + 1;
                        LSH4 = LSH3.ToString();