Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string roleId = Request.QueryString["role"];

            this.Page.Response.CacheControl = "no-cache";

            this.calcProgress.Tag = roleId;
            if (Page.IsPostBack == false)
            {
                SCRole role = (SCRole)MCS.Library.SOA.DataObjects.Security.Adapters.SchemaObjectAdapter.Instance.Load(roleId);

                if (role == null || role.Status != SchemaObjectStatus.Normal)
                {
                    throw new ObjectNotFoundException("未查询到指定的角色或角色已不再有效");
                }

                SCApplication app = DbUtil.LoadApplicationForRole(role);

                this.RoleAndAppObject = new RoleAndAppData()
                {
                    AppID = app.ID, AppCodeName = app.CodeName, AppName = app.Name, RoleCodeName = role.CodeName, RoleID = role.ID, RoleName = role.Name, RoleDisplayName = role.DisplayName
                };

                this.DeluxeSearch.UserCustomSearchConditions = DbUtil.LoadSearchCondition(ThisPageSearchResourceKey, "Default");
                this.CurrentAdvancedSearchCondition          = new PageAdvancedSearchCondition();

                this.gridMain.PageSize     = this.grid2.PageSize = ProfileUtil.PageSize;
                this.views.ActiveViewIndex = ProfileUtil.GeneralViewModeIndex;
            }

            this.binding1.Data      = this.RoleAndAppObject;
            this.searchBinding.Data = this.CurrentAdvancedSearchCondition;
        }