From 79992a503efe4f370886372f315366811b44a46b Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期四, 05 九月 2024 08:10:20 +0800 Subject: [PATCH] 1 --- Pub_Class/CustomerCls/ClsPub.cs | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Pub_Class/CustomerCls/ClsPub.cs b/Pub_Class/CustomerCls/ClsPub.cs index f324392..b242eab 100644 --- a/Pub_Class/CustomerCls/ClsPub.cs +++ b/Pub_Class/CustomerCls/ClsPub.cs @@ -1,12 +1,11 @@ 锘縰sing System; -using System.Collections.Generic; using System.Text; using System.Data; using System.Windows.Forms; using System.Drawing; -using System.Data.SqlClient; using System.Net.Sockets; using System.Net; +using SyntacticSugar.constant; namespace Pub_Class { @@ -59,11 +58,12 @@ public static DateTime XFCurEDate; public static DateTime KQCurBDate; public static DateTime KQCurEDate; - public static bool check; public static int HCheckStatus; public static string sSQLInfo; public static string sErrInfo; + + public enum Enum_BillStatus : int { @@ -1397,16 +1397,17 @@ { ClsSqlHelper oCn = new ClsSqlHelper(); DataSet Ds = new DataSet(); + try { Ds = oCn.RunProcReturn("Select GetDate() as CurDate", "xt_xtgnb"); switch (iType) { - case 0: + case TimeConstant.TIME_OF_THE_MONTH: return Convert.ToDateTime(Ds.Tables[0].Rows[0]["CurDate"]).ToString("yyyy-MM-dd"); - case 1: + case TimeConstant.TIME_OF_THE_HOUR: return Convert.ToDateTime(Ds.Tables[0].Rows[0]["CurDate"]).ToString("HH:mm:ss"); - case -1: + case TimeConstant.PRECISE_TIME: return Convert.ToDateTime(Ds.Tables[0].Rows[0]["CurDate"]).ToString("yyyy-MM-dd HH:mm:ss"); default: return "1900-01-01"; @@ -1427,11 +1428,13 @@ Ds = oCn.RunProcReturn("Select GetDate() as CurDate", "xt_xtgnb"); switch (iType) { - case 0: + case TimeConstant.TIME_OF_THE_MONTH: return Convert.ToDateTime(Ds.Tables[0].Rows[0]["CurDate"]).ToString("yyyy-MM-dd"); - case 1: + + case TimeConstant.TIME_OF_THE_HOUR: return Convert.ToDateTime(Ds.Tables[0].Rows[0]["CurDate"]).ToString("hh:mm:ss"); - case -1: + + case TimeConstant.PRECISE_TIME: return Convert.ToDateTime(Ds.Tables[0].Rows[0]["CurDate"]).ToString("yyyy-MM-dd HH:mm:ss"); default: return "1900-01-01"; @@ -1585,7 +1588,6 @@ } } } - // 璇诲彇鍒楀datagridview public static void GetGridView(DataGridView oGrd, string KeyItem, string AppPath) -- Gitblit v1.9.1