示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (ClientMessage == null)
            {
                ClientMessage = new Dictionary<string, string>();
                ClientMessage.Add("ModuleEditCheck", Message.ModuleEditCheck);
                ClientMessage.Add("EnableAndSaveRole", Message.EnableAndSaveRole);

            }
            string clientmsg = JsSerializer.Serialize(ClientMessage);
            Page.ClientScript.RegisterStartupScript(GetType(), "ClientMessage", "var Message=" + clientmsg + ";", true);

            if (Request.QueryString["rolecode"] != null)
            {
                roleCode = Request.QueryString["rolecode"].ToString();
                hidRoleCode.Value = roleCode;
                AuthorityModel authorityModel = new AuthorityModel();
                authorityModel.RoleCode = roleCode;
                //if (authorityBll.GetAuthority(authorityModel).Rows.Count==0)
                //{
                //    btnSave.Enabled = false;
                //}

                //獲取此角色是否已經失效
                this.DisableInfo.Value = roleBll.GetRoleByKey(roleCode).Deleted;

            }
            else
            {
                btnSave.Enabled = false;
            }
            if (!IsPostBack)
            {
                logmodel.ProcessOwner = CurrentUserInfo.Personcode;
                logmodel.TransactionType = Request.QueryString["modulecode"] == null ? "" : Request.QueryString["modulecode"].ToString();
                logmodel.LevelNo = "2";
                logmodel.FromHost = Request.UserHostAddress;

                LoadMoudelTree(roleCode);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["RoleCode"] != null && Request.QueryString["ModuleCode"] != null && Request.QueryString["RoleCheck"] != null && Request.QueryString["functionList"] != null)
                {
                    roleCode = Request.QueryString["RoleCode"].ToString();
                    moduleCode = Request.QueryString["ModuleCode"].ToString();
                    roleCheck = Request.QueryString["RoleCheck"].ToString() == "true";
                    functionList = Request.QueryString["functionList"].ToString();
                    txtModuleCode.Text = moduleCode;
                    AuthorityModel authorityModel = new AuthorityModel();
                    authorityModel.ModuleCode = moduleCode;
                    authorityModel.RoleCode = roleCode;
                    DataTable dtAuthority = authorityBll.GetAuthority(authorityModel);
                    ModuleModel moduleModel = new ModuleModel();
                    moduleModel.ModuleCode = moduleCode;
                    DataTable dtModule = moduleBll.GetModule(moduleModel);
                    txtAllFunctionList.Text = functionList;

                    txtFunctionDesc.Text = dtModule.Rows.Count != 0 ? dtModule.Rows[0]["DESCRIPTION"].ToString() : "";

                    txtFunctionList.Text = dtAuthority.Rows.Count != 0 ? dtAuthority.Rows[0]["FUNCTIONLIST"].ToString() : "";

                }
        }