From a7290cd76e9fc87988ccfde74194fadf7b46a7df Mon Sep 17 00:00:00 2001
From: jinghz@oceic.com <jinghz@oceic.com>
Date: 星期一, 03 七月 2023 15:31:12 +0800
Subject: [PATCH] 判断权限报错后,提示用户和模块
---
DBUtility/业务单据/ClsXt_BaseBill.cs | 56 +++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 47 insertions(+), 9 deletions(-)
diff --git "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs" "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs"
index ce3b7a0..4b7bcc9 100644
--- "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs"
+++ "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs"
@@ -48,8 +48,20 @@
public bool AbandonCancelltion(Int64 lngBillKey, ref string sReturn)
{
try
- {
- oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='',HDeleteDate=null Where HInterID=" + lngBillKey.ToString());
+ {
+ DataSet ds = oCn.RunProcReturn("select * from " + MvarItemKey + " where HInterID=" + lngBillKey.ToString(), MvarItemKey);
+ if (ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='',HDeleteDate=null,HBillStatus=3 Where HInterID=" + lngBillKey.ToString());
+ }
+ else if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='',HDeleteDate=null,HBillStatus=2 Where HInterID=" + lngBillKey.ToString());
+ }
+ else
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='',HDeleteDate=null,HBillStatus=1 Where HInterID=" + lngBillKey.ToString());
+ }
sReturn = "";
return true;
}
@@ -63,8 +75,21 @@
public bool CancelClose(Int64 lngBillKey, ref string sReturn)
{
try
- {
- oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null Where HInterID=" + lngBillKey.ToString());
+ {
+ 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());
+ }
+ else if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=2 Where HInterID=" + lngBillKey.ToString());
+ }
+ else
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=1 Where HInterID=" + lngBillKey.ToString());
+ }
+
sReturn = "";
return true;
}
@@ -83,8 +108,21 @@
return false;
}
try
- {
- oCn.RunProc(" Update " + MvarItemKey + " set HChecker='',HCheckDate=null Where HInterID=" + lngBillKey.ToString());
+ {
+ 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 HChecker='',HCheckDate=null,HBillStatus=4 Where HInterID=" + lngBillKey.ToString());
+ }
+ else if (ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HChecker='',HCheckDate=null,HBillStatus=3 Where HInterID=" + lngBillKey.ToString());
+ }
+ else
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HChecker='',HCheckDate=null,HBillStatus=1 Where HInterID=" + lngBillKey.ToString());
+ }
+
sReturn = "";
return true;
}
@@ -102,7 +140,7 @@
{
string HChecker = ClsPub.CurUserName ;
string HCheckDate =ClsPub.GetServerDate(-1);
- oCn.RunProc(" Update " + MvarItemKey + " set HChecker='" + HChecker + "',HCheckDate='" + HCheckDate + "' Where HInterID=" + lngBillKey.ToString());
+ oCn.RunProc(" Update " + MvarItemKey + " set HChecker='" + HChecker + "',HCheckDate='" + HCheckDate + "',HBillStatus=2 Where HInterID=" + lngBillKey.ToString());
sReturn = "";
return true;
}
@@ -138,7 +176,7 @@
{
string HCloseMan = ClsPub.CurUserName;
string HCloseDate = ClsPub.GetServerDate(-1);
- oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='" + HCloseMan + "',HCloseDate='" + HCloseDate + "' Where HInterID=" + lngBillKey.ToString());
+ oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='" + HCloseMan + "',HCloseDate='" + HCloseDate + "',HBillStatus=3 Where HInterID=" + lngBillKey.ToString());
sReturn = "";
return true;
}
@@ -173,7 +211,7 @@
{
string HDeleteMan = ClsPub.CurUserName;
string HDeleteDate = ClsPub.GetServerDate(-1);
- oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='" + HDeleteMan + "',HDeleteDate='" + HDeleteDate + "' Where HInterID=" + lngBillKey.ToString());
+ oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='" + HDeleteMan + "',HDeleteDate='" + HDeleteDate + "',HBillStatus=4 Where HInterID=" + lngBillKey.ToString());
sReturn = "";
return true;
}
--
Gitblit v1.9.1