예제 #1
0
        public static Page GetEd(int page_size, int page_number)
        {
            DataTable dt = SqlHelper.ExecuteDataTable(page_size, page_number,
                                                      "select * from auditorium where status=1 and use_time_end < GETDATE() order by use_time_start desc");
            List <ApplyForm> apply_lst = new List <ApplyForm>();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                int       id = int.Parse(dt.Rows[i]["id"].ToString());
                ApplyForm af = new ApplyForm(id);
                apply_lst.Add(af);
            }
            int total      = GetEdCount();
            int total_page = total / page_size + 1;

            return(new Page(apply_lst, total, page_size, page_number));
        }
예제 #2
0
        public static Page GetApplyInfoPage(int page_size, int page_number, int status)
        {
            DataTable dt = SqlHelper.ExecuteDataTable(page_size, page_number,
                                                      "select * from auditorium where status = @status order by use_time_start desc",
                                                      new SqlParameter("@status", status));
            List <ApplyForm> apply_lst = new List <ApplyForm>();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                int       id = int.Parse(dt.Rows[i]["id"].ToString());
                ApplyForm af = new ApplyForm(id);
                apply_lst.Add(af);
            }
            int total      = GetNewsCountOfApplyInfo(status);
            int total_page = total / page_size + 1;

            return(new Page(apply_lst, total, page_size, page_number));
        }