Beispiel #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.类型编号);
            }
            if (cols.Contains(3))
            {
                exp.And(t => t.知识面编号 == o.知识面编号);
            }
            if (cols.Contains(4))
            {
                exp.And(t => t.难度系数 == o.难度系数);
            }
            if (cols.Contains(5))
            {
                exp.And(t => t.显示模板 == o.显示模板);
            }
            if (cols.Contains(6))
            {
                exp.And(t => t.考核意图 == o.考核意图);
            }
            if (cols.Contains(7))
            {
                exp.And(t => t.备注 == o.备注);
            }
            if (cols.Contains(8))
            {
                exp.And(t => t.更新时间 == o.更新时间);
            }
            if (cols.Contains(9))
            {
                exp.And(t => t.是否启用 == o.是否启用);
            }
            return(Database.Tables.题.题.Delete(exp));
        }
Beispiel #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));
 }
Beispiel #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));
 }