示例#1
0
        public DepartmentCollection FetchByQuery(Query qry)
        {
            DepartmentCollection coll = new DepartmentCollection();

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
示例#2
0
        public DepartmentCollection FetchAll()
        {
            DepartmentCollection coll = new DepartmentCollection();
            Query qry = new Query(Department.Schema);

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
示例#3
0
        public static AVManager.DAL.DepartmentCollection GetDepartmentCollection(byte varShiftID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM Department INNER JOIN EmployeeDepartmentHistory ON " +
                "Department.DepartmentID=EmployeeDepartmentHistory.DepartmentID WHERE EmployeeDepartmentHistory.ShiftID=@ShiftID", Shift.Schema.Provider.Name);

            cmd.AddParameter("@ShiftID", varShiftID, DbType.Byte);
            IDataReader          rdr  = SubSonic.DataService.GetReader(cmd);
            DepartmentCollection coll = new DepartmentCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }