From 432413d3c47a938879ee8989f6c8cbdee28b3d26 Mon Sep 17 00:00:00 2001 From: aluo0720 Date: Mon, 22 Mar 2021 15:39:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20SYS.?= =?UTF-8?q?Core/Repository.cs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SYS.Core/Repository.cs | 121 ----------------------------------------- 1 file changed, 121 deletions(-) delete mode 100644 SYS.Core/Repository.cs diff --git a/SYS.Core/Repository.cs b/SYS.Core/Repository.cs deleted file mode 100644 index 4e3c66a..0000000 --- a/SYS.Core/Repository.cs +++ /dev/null @@ -1,121 +0,0 @@ -using MySql.Data.MySqlClient; -using NPOI.SS.Formula.Functions; -using System; -using System.Collections.Generic; -using System.Data; -using System.Data.Common; -using System.Linq; -using System.Linq.Expressions; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Common -{ - public class Repository:IRepository - { - private static string conStr = "Server=134.175.239.108;Database=tshoteldb;Uid=root;Pwd=yjj0720.;"; - - private static MySqlConnection con = null; - - public static MySqlConnection GetConnection() - { - if (con == null || con.ConnectionString == "") - { - con = new MySqlConnection(conStr); - } - return con; - } - - public static void Opencon() - { - if (con.State == ConnectionState.Closed) - { - con.Open(); - } - } - - public static void Closecon() - { - if (con.State == ConnectionState.Open) - { - con.Close(); - } - } - - public int ExecuteSql(string sql, params DbParameter[] pars) - { - return 0; - } - - public List ExecuteQuery(string sql, params DbParameter[] pars) - { - return List; - } - - public int Add(T entity, bool isLog = true) - { - return 0; - } - - public int Add(IEnumerable entities, bool isLog = true) - { - return 0; - - } - - public int Delete(T entity, bool isLog = true) - { - return 0; - } - - public int Delete(IEnumerable entities, bool isLog = true) - { - return 0; - } - - public int Delete(Expression> where, bool isLog = true) - { - return 0; - } - - public int Update(T entity, bool isLog = true) - { - return 0; - } - - public int Update(T entity, List>> ignoreProperties, bool isLog = true) - { - return 0; - } - - public int Update(T entity, Expression> where, List proNames, bool isLog = true) - { - return 0; - } - - public int Update(T entity, Expression> where, List>> proNames, bool isLog = true) - { - return 0; - } - - public int Update(Expression> where, Action action, bool isLog = true) - { - return 0; - } - - public T GetOne(Expression> where) - { - return 0; - } - - public List GetList(Expression> where = null) - { - - } - - int GetCount(Expression> where = null) - { - - } - } -} -- Gitee From 63289350efa1d3851b3b572fc8ae8bc01c2c81f4 Mon Sep 17 00:00:00 2001 From: Chunkit Yeung Date: Wed, 14 Apr 2021 21:56:13 +0800 Subject: [PATCH 2/2] fixed_logicerror;optimization_ui;v1.5.0.1 --- SYS.Core/Repository/Repository.cs | 33 ++++++++++++++++++ ...gnTimeResolveAssemblyReferencesInput.cache | Bin 7606 -> 7586 bytes SYS.FormUI/AppFunction/FrmAddRoom.cs | 6 ++-- SYS.FormUI/AppFunction/FrmAddWorker.cs | 6 ++-- SYS.FormUI/AppFunction/FrmChangePosition.cs | 2 +- SYS.FormUI/AppFunction/FrmChangeRoom.cs | 4 +-- SYS.FormUI/AppFunction/FrmCheckIn.cs | 10 +++--- SYS.FormUI/AppFunction/FrmCheckOutForm.cs | 15 ++++---- SYS.FormUI/AppFunction/FrmCustoManager.cs | 13 +++---- SYS.FormUI/AppFunction/FrmCustomerManager.cs | 14 ++++---- SYS.FormUI/AppFunction/FrmGoodOrBad.cs | 6 ++-- SYS.FormUI/AppFunction/FrmInputs.cs | 6 ++-- SYS.FormUI/AppFunction/FrmReserList.cs | 2 ++ SYS.FormUI/AppFunction/FrmRoomStateManager.cs | 6 ++-- SYS.FormUI/AppFunction/FrmSellThing.cs | 14 ++++---- SYS.FormUI/AppFunction/FrmUnLockSystem.cs | 4 +-- SYS.FormUI/AppFunction/FrmUpLoadNotice.cs | 2 +- SYS.FormUI/AppInterface/FrmLogin.cs | 10 +++--- SYS.FormUI/AppMain/FrmBackgroundSystem.cs | 5 ++- SYS.FormUI/AppUserControls/ucRoomList.cs | 3 +- SYS.FormUI/Properties/AssemblyInfo.cs | 4 +-- .../DesignTimeResolveAssemblyReferences.cache | Bin 98198 -> 98198 bytes 22 files changed, 102 insertions(+), 63 deletions(-) create mode 100644 SYS.Core/Repository/Repository.cs diff --git a/SYS.Core/Repository/Repository.cs b/SYS.Core/Repository/Repository.cs new file mode 100644 index 0000000..046bb4f --- /dev/null +++ b/SYS.Core/Repository/Repository.cs @@ -0,0 +1,33 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SYS.Common +{ + public class Repository : SimpleClient where T : class, new() + { + public Repository(ISqlSugarClient context = null) : base(context)//注意这里要有默认值等于null + { + if (context == null) + { + base.Context = new SqlSugarClient(new ConnectionConfig() + { + DbType = SqlSugar.DbType.MySql, + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true, + ConnectionString = ConfigurationManager.AppSettings["strSQL"].ToString() + }); + + base.Context.Aop.OnLogExecuting = (s, p) => + { + Console.WriteLine(s); + }; + } + } + + } +} diff --git a/SYS.Core/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/SYS.Core/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 5023b7eb855c3e35a5232a060f54d9f0b8753595..f08b773bf72a251b2090cd5e1445fc296e4bd585 100644 GIT binary patch delta 264 zcmdmHy~ujQ9v;g;7poZG%;ci{;{3D{g|N)x(!?Bv;F8jm%={Q514GN0fTH}g)Z*gI z{Jg}R80Y-l-26QA7*7}1$-j8yEd9yWy@6N6F(oI5O`3s$ff7?>$alkLF1|JV0BIUt AR{#J2 delta 67 zcmZ2vz0G>V9v;T9$=*^PBEFTug*kdIi6x18DLFZ8QVa|XAs~s#Yj`;)C-8DG!gzvU Lmc!3{gVDT$t$_rdtX0Ao-WyS_CZcLH@D^nmUmckSWBF^5vmgn@%lMe6kxDWS&k~Sp z+9+ildbMG#lW&iTQGD2wf#W`YF)B_Ok6tB?uj2EgW0eW$Z4h2tbb{hXuR1(;1kZ|z zR8p{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