private void LoadData_Bitralai()
        {
            string sOrder = GetOrderString() == "" ? "" : " ORDER BY " + GetOrderString();

            Pager3.PageSize = Global.MembersPerPage;
            HPCBusinessLogic.DAL.T_IdieaDAL _T_IdieaDAL = new HPCBusinessLogic.DAL.T_IdieaDAL();
            DataSet _ds;

            _ds = _T_IdieaDAL.BindGridT_IdieaEditor(Pager3.PageIndex, Pager3.PageSize, BuildSQL(64, sOrder));
            int TotalRecords = Convert.ToInt32(_ds.Tables[1].Rows[0].ItemArray[0].ToString());
            int TotalRecord  = Convert.ToInt32(_ds.Tables[0].Rows.Count);

            if (TotalRecord == 0)
            {
                _ds = _T_IdieaDAL.BindGridT_IdieaEditor(Pager3.PageIndex - 1, Pager3.PageSize, BuildSQL(64, sOrder));
            }
            dgDXL.DataSource = _ds;
            dgDXL.DataBind();
            Pager3.TotalRecords = CurrentPage3.TotalRecords = TotalRecords;

            TabPanel2.HeaderText = "Đề tài đã xử lý (" + TotalRecords + ")";
            DataSet _dsReturn;

            _dsReturn = _T_IdieaDAL.BindGridT_IdieaEditor(pages.PageIndex - 1, pages.PageSize, BuildSQL(62, sOrder));
            this.tabpnltinXuly.HeaderText = "Đề tài đang xử lý (" + _dsReturn.Tables[1].Rows[0].ItemArray[0].ToString() + ")";
            _dsReturn.Clear();
            DataSet _dsReturn1;

            _dsReturn1 = _T_IdieaDAL.BindGridT_IdieaEditor(pages2.PageIndex - 1, pages2.PageSize, BuildSQL(63, sOrder));
            this.TabPanel1.HeaderText = "Bài chờ duyệt (" + _dsReturn1.Tables[1].Rows[0].ItemArray[0].ToString() + ")";
            _dsReturn1.Clear();
            CurrentPage3.TotalPages = Pager3.CalculateTotalPages();
            CurrentPage3.PageIndex  = Pager3.PageIndex;
        }
Example #2
0
        public ActionResult List(int p = 1)
        {
            PermissionEntities perEntities = new PermissionEntities();
            int    pagesize  = 10;
            int    count     = GetCount();
            string pagerInfo = Pager3.CreatePageNums(count, pagesize, p);

            ViewBag.pager = pagerInfo;

            //第二页数据
            // var pagerList = perEntities.RolePermission.OrderBy(x => x.ID).Skip((p - 1) * pagesize).Take(10).ToList();

            var query = perEntities.RolePermission.Join(perEntities.RoleTable,
                                                        rp => rp.RoleID,
                                                        r => r.ID,
                                                        (rp, r) => new {
                rp.ID,
                RoleName = r.Name,
                rp.PermissionID
            });

            var list = query.Join(perEntities.Permission, rp => rp.PermissionID, g => g.ID, (rp, g) => new ViewModels.RolePermissionView()
            {
                ID             = rp.ID,
                RoleName       = rp.RoleName,
                PermissionName = g.Name
            }).OrderBy(x => x.ID).Skip((p - 1) * pagesize).Take(10).ToList();

            return(View(list));
        }
Example #3
0
        private void Load_DaPhanViec()
        {
            string sOrder = GetOrderString() == "" ? "" : " ORDER BY " + GetOrderString();

            Pager3.PageSize = Global.MembersPerPage;
            HPCBusinessLogic.DAL.T_IdieaDAL     _T_IdieaDAL = new HPCBusinessLogic.DAL.T_IdieaDAL();
            HPCBusinessLogic.DAL.T_AllotmentDAL _DAL        = new HPCBusinessLogic.DAL.T_AllotmentDAL();
            DataSet _ds;

            _ds = _T_IdieaDAL.BindGridT_IdieaEditor(Pager3.PageIndex, Pager3.PageSize, BuildSQL(26, sOrder));
            int TotalRecords = Convert.ToInt32(_ds.Tables[1].Rows[0].ItemArray[0].ToString());
            int TotalRecord  = Convert.ToInt32(_ds.Tables[0].Rows.Count);

            if (TotalRecord == 0)
            {
                _ds = _T_IdieaDAL.BindGridT_IdieaEditor(Pager3.PageIndex - 1, Pager3.PageSize, BuildSQL(26, sOrder));
            }
            dgr_tintuc3.DataSource = _ds;
            dgr_tintuc3.DataBind();
            Pager3.TotalRecords = CurrentPage3.TotalRecords = TotalRecords;

            #region DETAI BI TRA LAI
            TabPanel22.HeaderText = "Đề tài bị trả lại (" + TotalRecords + ")";
            System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "javascript", "javascript: SetInnerBaiDaPhanCong(" + TotalRecords + ");", true);
            DataSet _dsReturn1;
            DataSet _dsReturn2;
            DataSet _dsReturn3;
            _dsReturn1 = _T_IdieaDAL.BindGridT_IdieaEditor(pages2.PageIndex, pages2.PageSize, BuildSQL(23, sOrder));
            this.TabPanel1.HeaderText = "Đề tài đã hoàn thành (" + _dsReturn1.Tables[1].Rows[0].ItemArray[0].ToString() + ")";
            _dsReturn1.Clear();
            _dsReturn2 = _T_IdieaDAL.BindGridT_IdieaEditor(pages.PageIndex - 1, pages.PageSize, BuildSQL(22, sOrder));
            this.tabpnltinXuly.HeaderText = "Đề tài chưa phân công công việc (" + _dsReturn2.Tables[1].Rows[0].ItemArray[0].ToString() + ")";
            _dsReturn2.Clear();
            _dsReturn3 = _DAL.BindGridT_AllotmentEditor(Pager4.PageIndex, Pager4.PageSize, BuildSQLCongViec(sOrder));
            this.TabPanel2.HeaderText = "Danh sách công việc (" + _dsReturn3.Tables[1].Rows[0].ItemArray[0].ToString() + ")";
            _dsReturn3.Clear();
            #endregion

            CurrentPage3.TotalPages = Pager3.CalculateTotalPages();
            CurrentPage3.PageIndex  = Pager3.PageIndex;
        }
Example #4
0
        private void LoadData_Baidaxuly()
        {
            string sOrder = GetOrderString() == "" ? "" : " ORDER BY " + GetOrderString();

            Pager3.PageSize = Global.MembersPerPage;
            HPCBusinessLogic.DAL.T_NewsDAL _T_newsDAL = new HPCBusinessLogic.DAL.T_NewsDAL();
            DataSet _ds;

            _ds = _T_newsDAL.Bin_T_NewsVersionDynamic(Pager3.PageIndex, Pager3.PageSize, BuildSQL(ConstNews.NewsAppro, sOrder));
            int TotalRecords = Convert.ToInt32(_ds.Tables[1].Rows[0].ItemArray[0].ToString());
            int TotalRecord  = Convert.ToInt32(_ds.Tables[0].Rows.Count);

            if (TotalRecord == 0)
            {
                _ds = _T_newsDAL.Bin_T_NewsVersionDynamic(Pager3.PageIndex - 1, Pager3.PageSize, BuildSQL(ConstNews.NewsAppro, sOrder));
            }
            Dgr_Baidaxuly.DataSource = _ds;
            Dgr_Baidaxuly.DataBind(); _ds.Clear();
            Pager3.TotalRecords     = CurrentPage3.TotalRecords = TotalRecords;
            CurrentPage3.TotalPages = Pager3.CalculateTotalPages();
            CurrentPage3.PageIndex  = Pager3.PageIndex;
            GetTotal();
        }