Beispiel #1
0
        public void LoadPSdaduyet()
        {
            Pager_daduyet.PageSize = Global.MembersPerPage;
            HPCBusinessLogic.DAL.T_Album_CategoriesDAL _cateDAL = new HPCBusinessLogic.DAL.T_Album_CategoriesDAL();
            DataSet _ds;

            _ds = _cateDAL.Bind_T_Album_CategoriesDynamic(Pager_daduyet.PageIndex, Pager_daduyet.PageSize, WhereCondition(3));
            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 = _cateDAL.Bind_T_Album_CategoriesDynamic(Pager_daduyet.PageIndex - 1, Pager_daduyet.PageSize, WhereCondition(3));
            }
            DataGrid_XB.DataSource = _ds;
            DataGrid_XB.DataBind(); _ds.Clear();
            Pager_daduyet.TotalRecords     = CurrentPage_daduyet.TotalRecords = TotalRecords;
            CurrentPage_daduyet.TotalPages = Pager_daduyet.CalculateTotalPages();
            CurrentPage_daduyet.PageIndex  = Pager_daduyet.PageIndex;
            GetTotal();
            foreach (DataGridItem item in DataGrid_XB.Items)
            {
                ImageButton btnview  = (ImageButton)item.FindControl("btnViewPhoto");
                Label       lblcatid = (Label)item.FindControl("lblcatid");
                btnview.Attributes.Add("onclick", "PopupWindow('T_Album_Categories_View.aspx?catps=" + lblcatid.Text + "')");
                item.Attributes.Add("onmouseover", "currColor=this.style.backgroundColor;this.style.backgroundColor='" + CommonLib.HPCOnmouseoverGrid() + "'");
                item.Attributes.Add("onmouseout", "this.style.backgroundColor=currColor");
            }
        }
        public void Load_XB()
        {
            Pager_XB.PageSize = 5;
            T_MultimediaDAL _untilDAL = new T_MultimediaDAL();
            DataSet         _ds;

            _ds = _untilDAL.BindGridT_Multimedia(Pager_XB.PageIndex, Pager_XB.PageSize, WhereCondition(3));
            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 = _untilDAL.BindGridT_Multimedia(Pager_XB.PageIndex - 1, Pager_XB.PageSize, WhereCondition(3));
            }
            DataGrid_XB.DataSource = _ds.Tables[0];
            DataGrid_XB.DataBind(); _ds.Clear();
            Pager_XB.TotalRecords     = CurrentPage_XB.TotalRecords = TotalRecords;
            CurrentPage_XB.TotalPages = Pager_XB.CalculateTotalPages();
            CurrentPage_XB.PageIndex  = Pager_XB.PageIndex;
            GetTotal();
        }