コード例 #1
0
        public ActionResult GetRoleList(RoleFilter filter)
        {
            int total = 0;
            var data  = business.GetRoleList(filter, out total);

            return(Json(new TableDataModel(total, data)));
        }
コード例 #2
0
        private void BindData(int nPageIndex)
        {
            string strWhere = string.Format("  AND R.COMPANYID={0} ", CompanyId);

            strWhere += string.Format(" AND R.PROJECTID={0} ", ddlProject.SelectedValue);


            int nCount = 0;

            //角色名
            if (txtRoleName.Text.Trim().Length > 0)
            {
                strWhere += string.Format(" AND R.ROLENAME ='{0}' ", ValidatorHelper.SafeSql(txtRoleName.Text));
            }

            DataTable dt = RoleBusiness.GetRoleList(nPageIndex, GlobalConsts.PageSize_Default, strWhere, out nCount);

            rptRoleInfo.DataSource = dt;
            rptRoleInfo.DataBind();
            PageBar1.PageIndex   = nPageIndex;
            PageBar1.PageSize    = GlobalConsts.PageSize_Default;
            PageBar1.RecordCount = nCount;
            PageBar1.Draw();
        }