Esempio n. 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.题编号 &
                                                        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));
        }
Esempio n. 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));
 }
Esempio n. 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));
 }