yusijie
2024-03-12 abf59bc386d65013b4782eb0b3af463457dbe968
DBUtility/ÒµÎñµ¥¾Ý/ClsXt_BaseBill.cs
@@ -120,15 +120,15 @@
                DataSet ds = oCn.RunProcReturn("select * from " + MvarItemKey + " where HInterID=" + lngBillKey.ToString(), MvarItemKey);
                if (ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
                {
                    oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=4 Where HInterID=" + lngBillKey.ToString());
                    oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=4,HCloseType = 0 Where HInterID=" + lngBillKey.ToString());
                }
                else if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
                {
                    oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=2 Where HInterID=" + lngBillKey.ToString());
                    oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=2,HCloseType = 0 Where HInterID=" + lngBillKey.ToString());
                }
                else
                {
                    oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=1 Where HInterID=" + lngBillKey.ToString());
                    oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=1,HCloseType = 0 Where HInterID=" + lngBillKey.ToString());
                }
                sReturn = "";
@@ -149,15 +149,15 @@
                DataSet ds = oCn.RunProcReturn("select * from " + MvarItemKey + " where HInterID=" + lngBillKey.ToString(), MvarItemKey);
                if (ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
                {
                    oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=4 Where HInterID=" + lngBillKey.ToString());
                    oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=4,HCloseType = 0 Where HInterID=" + lngBillKey.ToString());
                }
                else if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
                {
                    oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=2 Where HInterID=" + lngBillKey.ToString());
                    oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=2,HCloseType = 0 Where HInterID=" + lngBillKey.ToString());
                }
                else
                {
                    oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=1 Where HInterID=" + lngBillKey.ToString());
                    oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=1,HCloseType = 0 Where HInterID=" + lngBillKey.ToString());
                }
                //写入日志
@@ -183,7 +183,7 @@
        {
            try
            {
                oCn.BeginTran();
                //oCn.BeginTran();
                string sql = "select * from " + MvarItemKeySub + " where HInterID=" + lngBillKey.ToString() + " and HEntryID = " + HEntryID;
                DataSet ds = oCn.RunProcReturn(sql, MvarItemKeySub);
                if(ds==null || ds.Tables[0].Rows.Count == 0)
@@ -205,7 +205,7 @@
                    );
                sReturn = "行反关闭成功!";
                oCn.Commit();
                //oCn.Commit();
                return true;
            }
            catch (Exception e)
@@ -422,7 +422,7 @@
                oCn.BeginTran();
                string HCloseMan = sUser;
                string HCloseDate = ClsPub.GetServerDate(-1);
                oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='" + HCloseMan + "',HCloseDate='" + HCloseDate + "',HBillStatus=3 Where HInterID=" + lngBillKey.ToString());
                oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='" + HCloseMan + "',HCloseDate='" + HCloseDate + "',HBillStatus=3,HCloseType = 1 Where HInterID=" + lngBillKey.ToString());
                
                //写入日志
                string WorkList = "关闭单据,单据号:" + HBillNo;