示例#1
0
        public static int Delete(this Database.Tables.人.岗位 o, ColumnEnums.Tables.人.岗位.Handler conditionCols = null)
        {
            if (conditionCols == null)
            {
                return(Database.Tables.人.岗位.Delete(t =>
                                                   t.岗位编号 == o.岗位编号
                                                   ));
            }
            var cols = conditionCols(new DAL.ColumnEnums.Tables.人.岗位());
            var exp  = new DAL.Expressions.Tables.人.岗位();

            if (cols.Contains(0))
            {
                exp.And(t => t.岗位编号 == o.岗位编号);
            }
            if (cols.Contains(1))
            {
                exp.And(t => t.称 == o.称);
            }
            if (cols.Contains(2))
            {
                exp.And(t => t.备注 == o.备注);
            }
            return(Database.Tables.人.岗位.Delete(exp));
        }
示例#2
0
 public static int Update(this Database.Tables.人.岗位 o, Expressions.Tables.人.岗位.Handler eh = null, ColumnEnums.Tables.人.岗位.Handler updateCols = null, ColumnEnums.Tables.人.岗位.Handler fillCols = null, bool isFillAfterUpdate = true)
 {
     return(Database.Tables.人.岗位.Update(o, eh, updateCols, fillCols, isFillAfterUpdate));
 }
示例#3
0
 public static int Insert(this Database.Tables.人.岗位 o, ColumnEnums.Tables.人.岗位.Handler insertCols = null, ColumnEnums.Tables.人.岗位.Handler fillCols = null, bool isFillAfterInsert = true)
 {
     return(Database.Tables.人.岗位.Insert(o, insertCols, fillCols, isFillAfterInsert));
 }