コード例 #1
0
 /// <summary>
 /// 修改[部门]数据到本地
 /// </summary>
 /// <param name="connection"></param>
 /// <param name="transaction"></param>
 /// <param name="dept"></param>
 /// <returns></returns>
 internal int Update_Dept(IDbConnection connection, IDbTransaction transaction, Department dept)
 {
     var update = connection.Update("Department")
         .Set("PK_Dept", DbType.AnsiString, dept.PK_Dept)
         .Set("InnerCode", DbType.AnsiString, dept.InnerCode)
         .Set("Name", DbType.AnsiString, dept.Name)
         .Set("PK_FDept", DbType.AnsiString, dept.PK_FDept)
         .Set("PK_Org", DbType.AnsiString, dept.PK_Org)
         .Set("PK_Group", DbType.AnsiString, dept.PK_Group)
         .Set("T_Updater", DbType.AnsiString, dept.T_Updater)
         .Set("T_UpdaterName", DbType.AnsiString, dept.T_UpdaterName)
         .Set("T_UpdateTime", DbType.DateTime, dept.T_UpdateTime)
         .Set("NC_Modifiedtime", DbType.AnsiString, dept.NC_Modifiedtime)
         .Where(WhereMySQL.Equal("NC_PK_Dept", DbType.AnsiString, dept.NC_PK_Dept))
         .Execute();
     return update;
 }
コード例 #2
0
 internal DepartmentInsert(IDbConnection _conn, Department _entity)
 {
     this.Connection = _conn;
     this.IsBeginTransaction = false;
     this.entity = _entity;
 }
コード例 #3
0
 /// <summary>
 /// 新增[部门]数据到本地
 /// </summary>
 /// <param name="connection"></param>
 /// <param name="transaction"></param>
 /// <param name="dept"></param>
 /// <returns></returns>
 internal int Insert_Dept(IDbConnection connection, IDbTransaction transaction, Department dept)
 {
     var insert = connection.Insert("Department")
         .Field("PK_Dept", DbType.AnsiString, dept.PK_Dept)
         .Field("InnerCode", DbType.AnsiString, dept.InnerCode)
         .Field("Name", DbType.AnsiString, dept.Name)
         .Field("PK_FDept", DbType.AnsiString, dept.PK_FDept)
         .Field("PK_Org", DbType.AnsiString, dept.PK_Org)
         .Field("PK_Group", DbType.AnsiString, dept.PK_Group)
         .Field("T_Creater", DbType.AnsiString, dept.T_Creater)
         .Field("T_CreaterName", DbType.AnsiString, dept.T_CreaterName)
         .Field("T_CreateTime", DbType.DateTime, dept.T_CreateTime)
         .Field("T_Updater", DbType.AnsiString, dept.T_Updater)
         .Field("T_UpdaterName", DbType.AnsiString, dept.T_UpdaterName)
         .Field("T_UpdateTime", DbType.DateTime, dept.T_UpdateTime)
         .Field("NC_PK_Dept", DbType.AnsiString, dept.NC_PK_Dept)
         .Field("NC_Modifiedtime", DbType.AnsiString, dept.NC_Modifiedtime)
         .Execute();
     return insert;
 }