| | |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //åä½åº(å
å«ä½åºåæ§å¶ãåå
¥æ¥å¿) 2025-03-10 |
| | | public bool AbandonCancelltion(Int64 lngBillKey, string HBillNo, string procName, string sUser, ref string sReturn) |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | //ä½åºåæ§å¶ |
| | | //åä½åºåæ§å¶ |
| | | sql = "exec " + procName + " " + lngBillKey + ",'" + HBillNo + "','" + sUser + "'"; |
| | | ds = oCn.RunProcReturn(sql, procName); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //åå
³éåæ®(å
å«åå
¥æ¥å¿) 2024-01-31 |
| | | public bool CancelClose(Int64 lngBillKey, string HBillNo, string sUser, ref string sReturn) |
| | | { |
| | |
| | | else |
| | | { |
| | | oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=1,HCloseType = 0 Where HInterID=" + lngBillKey.ToString()); |
| | | } |
| | | |
| | | //åå
¥æ¥å¿ |
| | | string WorkList = "åå
³éåæ®ï¼åæ®å·ï¼" + HBillNo; |
| | | string SystemName = "LMES-" + MvarReportTitle + "模å"; |
| | | oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " + |
| | | "(getdate(),'" + sUser + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','" + IPAddress + "','åå
³é')" |
| | | ); |
| | | |
| | | sReturn = "åå
³éåæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //åå
³éåæ®(å
å«åå
³éåæ§å¶ åå
¥æ¥å¿) 2025-03-18 |
| | | public bool CancelClose(Int64 lngBillKey, string HBillNo, string procName, string sUser, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | string sql = ""; |
| | | oCn.BeginTran(); |
| | | 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,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,HCloseType = 0 Where HInterID=" + lngBillKey.ToString()); |
| | | } |
| | | else |
| | | { |
| | | oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=1,HCloseType = 0 Where HInterID=" + lngBillKey.ToString()); |
| | | } |
| | | |
| | | //åå
³éåæ§å¶ |
| | | sql = "exec " + procName + " " + lngBillKey + ",'" + HBillNo + "','" + sUser + "'"; |
| | | ds = oCn.RunProcReturn(sql, procName); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sReturn = "åå
³éè¿ç¨ä¸åºéï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | sReturn = ds.Tables[0].Rows[0]["HRemark"].ToString(); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | |
| | | //åå
¥æ¥å¿ |
| | |
| | | string sql1 = "select b.HInterID,b.HCheckItemID from Xt_CheckFlowMain as a " + |
| | | "inner join Xt_CheckFlowSub as b on a.HInterID = b.HInterID " + |
| | | "where a.HBillTypeID = '" + this.BillType + "' " + |
| | | "and a.HInterID = " + HCheckFlowID_select + " " + |
| | | //"and a.HInterID = " + HCheckFlowID_select + " " + |
| | | "and a.HStandard = 1 " + |
| | | "order by b.HFlowNo asc"; |
| | | DataSet ds1 = oCn.RunProcReturn(sql1, "Xt_CheckFlowMain"); |
| | | if (ds1 == null || ds1.Tables[0].Rows.Count == 0) |
| | |
| | | if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | string HBillType = ds.Tables[0].Rows[0]["HBillType"].ToString(); |
| | | if (HBillType == "1201" || HBillType == "1202" || HBillType == "1203" || HBillType == "1247" || HBillType == "1244" || HBillType == "1251" || HBillType == "1210" || HBillType == "1205" || HBillType == "1250" || HBillType == "1206" || HBillType == "1245" || HBillType == "1239") |
| | | if (HBillType == "1201" || HBillType == "1202" || HBillType == "1203" || HBillType == "1247" || HBillType == "1244" || HBillType == "1251" || HBillType == "1210" || HBillType == "1205" || HBillType == "1250" || HBillType == "1206" || HBillType == "1245" || HBillType == "1239"|| HBillType == "1256") |
| | | { |
| | | //åå®¡æ ¸æ´æ° åæ¶åºå表 å¢å åºå 1201 1202 1203 1247 1244 1251 1210 |
| | | //åå®¡æ ¸æ´æ° åæ¶åºå表 åå°åºå 1205 1250 1206 1245 1239 |
| | |
| | | if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | string HBillType = ds.Tables[0].Rows[0]["HBillType"].ToString(); |
| | | if (HBillType == "1201" || HBillType == "1202" || HBillType == "1203" || HBillType == "1247" || HBillType == "1244" || HBillType == "1251" || HBillType == "1210" || HBillType == "1250" || HBillType == "1206" || HBillType == "1245" || HBillType == "1239") |
| | | if (HBillType == "1201" || HBillType == "1202" || HBillType == "1203" || HBillType == "1247" || HBillType == "1244" || HBillType == "1251" || HBillType == "1210" || HBillType == "1250" || HBillType == "1206" || HBillType == "1245" || HBillType == "1239" || HBillType == "1256") |
| | | { |
| | | //å®¡æ ¸æ´æ° åæ¶åºå表 å¢å åºå 1201 1202 1203 1247 1244 1251 1210 |
| | | //å®¡æ ¸æ´æ° åæ¶åºå表 åå°åºå 1204 1250 1206 1245 1239 |
| | |
| | | } |
| | | } |
| | | |
| | | //å
³éåæ®(å
å«å
³éåæ§å¶ åå
¥æ¥å¿) 2025-03-18 |
| | | public bool CloseBill(Int64 lngBillKey, string HBillNo, string procName, string sUser, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | string sql = ""; |
| | | DataSet ds; |
| | | oCn.BeginTran(); |
| | | string HCloseMan = sUser; |
| | | string HCloseDate = ClsPub.GetServerDate(-1); |
| | | oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='" + HCloseMan + "',HCloseDate='" + HCloseDate + "',HBillStatus=3,HCloseType = 1 Where HInterID=" + lngBillKey.ToString()); |
| | | |
| | | //å
³éåæ§å¶ |
| | | sql = "exec " + procName + " " + lngBillKey + ",'" + HBillNo + "','" + sUser + "'"; |
| | | ds = oCn.RunProcReturn(sql, procName); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sReturn = "å
³éè¿ç¨ä¸åºéï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | sReturn = ds.Tables[0].Rows[0]["HRemark"].ToString(); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | |
| | | //åå
¥æ¥å¿ |
| | | string WorkList = "å
³éåæ®ï¼åæ®å·ï¼" + HBillNo; |
| | | string SystemName = "LMES-" + MvarReportTitle + "模å"; |
| | | oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " + |
| | | "(getdate(),'" + sUser + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','" + IPAddress + "','å
³é')" |
| | | ); |
| | | |
| | | sReturn = "å
³éåæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //è¡å
³éåæ®ï¼è¡å
³éåæ§å¶ï¼(å
å«åå
¥æ¥å¿) 2024-01-31 |
| | | public bool CloseRow(Int64 lngBillKey, Int64 HEntryID, string HBillNo, string sUser, string procName, ref string sReturn) |
| | | { |