Example #1
0
        protected override void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);

            if (!this.IsPostBack)
            {
                litPageTitle.Text = GetLabelText("Role_Title");
                litRoleName.Text = GetLabelText("Role_RoleName");
                txtRoleName.ToolTip = GetLabelText("Role_RoleName");
                litDescription.Text = GetLabelText("Role_Description");
                txtDescription.ToolTip = GetLabelText("Role_Description");

                if (Request.QueryString["action"] == "modify")
                {
                    //get RoleId
                    int RoleId = Convert.ToInt32(Request.QueryString["id"]);

                    //Role entity
                    Johnny.CMS.BLL.Access.Role bll = new Johnny.CMS.BLL.Access.Role();

                    //bind data
                    Johnny.CMS.OM.Access.Role model = new Johnny.CMS.OM.Access.Role();
                    model = bll.GetModel(RoleId);

                    txtRoleName.Text = model.RoleName;
                    txtDescription.Text = model.Description;

                    btnAdd.ButtonType = Johnny.Controls.Web.Button.Button.EnumButtonType.Save;
//                    btnAdd.Text = CONST_BUTTONTEXT_SAVE;
                }

                //RFVldtRoleName.ErrorMessage = GetMessage("E01501", txtRoleName.MaxLength.ToString());
            }
        }
Example #2
0
        protected override void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);

            if (!this.IsPostBack)
            {
                litPageTitle.Text      = GetLabelText("Role_Title");
                litRoleName.Text       = GetLabelText("Role_RoleName");
                txtRoleName.ToolTip    = GetLabelText("Role_RoleName");
                litDescription.Text    = GetLabelText("Role_Description");
                txtDescription.ToolTip = GetLabelText("Role_Description");

                if (Request.QueryString["action"] == "modify")
                {
                    //get RoleId
                    int RoleId = Convert.ToInt32(Request.QueryString["id"]);

                    //Role entity
                    Johnny.CMS.BLL.Access.Role bll = new Johnny.CMS.BLL.Access.Role();

                    //bind data
                    Johnny.CMS.OM.Access.Role model = new Johnny.CMS.OM.Access.Role();
                    model = bll.GetModel(RoleId);

                    txtRoleName.Text    = model.RoleName;
                    txtDescription.Text = model.Description;

                    btnAdd.ButtonType = Johnny.Controls.Web.Button.Button.EnumButtonType.Save;
//                    btnAdd.Text = CONST_BUTTONTEXT_SAVE;
                }

                //RFVldtRoleName.ErrorMessage = GetMessage("E01501", txtRoleName.MaxLength.ToString());
            }
        }