コード例 #1
0
 public DeptModel Get(
     SiteSettings ss,
     Sqls.TableTypes tableType    = Sqls.TableTypes.Normal,
     SqlColumnCollection column   = null,
     SqlJoinCollection join       = null,
     SqlWhereCollection where     = null,
     SqlOrderByCollection orderBy = null,
     SqlParamCollection param     = null,
     bool distinct = false,
     int top       = 0)
 {
     Set(ss, Rds.ExecuteTable(statements: Rds.SelectDepts(
                                  tableType: tableType,
                                  column: column ?? Rds.DeptsDefaultColumns(),
                                  join: join ?? Rds.DeptsJoinDefault(),
                                  where : where ?? Rds.DeptsWhereDefault(this),
                                  orderBy: orderBy,
                                  param: param,
                                  distinct: distinct,
                                  top: top)));
     return(this);
 }
コード例 #2
0
        private IEnumerable <DataRow> Get(
            SqlColumnCollection column   = null,
            SqlJoinCollection join       = null,
            SqlWhereCollection where     = null,
            SqlOrderByCollection orderBy = null,
            SqlParamCollection param     = null,
            Sqls.TableTypes tableType    = Sqls.TableTypes.Normal,
            bool distinct    = false,
            int top          = 0,
            int offset       = 0,
            int pageSize     = 0,
            bool history     = false,
            bool countRecord = false)
        {
            var statements = new List <SqlStatement>
            {
                Rds.SelectDepts(
                    dataTableName: "Main",
                    column: column ?? Rds.DeptsDefaultColumns(),
                    join: join ?? Rds.DeptsJoinDefault(),
                    where : where,
                    orderBy: orderBy,
                    param: param,
                    tableType: tableType,
                    distinct: distinct,
                    top: top,
                    offset: offset,
                    pageSize: pageSize,
                    countRecord: countRecord)
            };
            var dataSet = Rds.ExecuteDataSet(
                transactional: false,
                statements: statements.ToArray());

            TotalCount = Rds.Count(dataSet);
            return(dataSet.Tables["Main"].AsEnumerable());
        }