Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int id = QS("id", 0);
                if (id == 0)
                {
                    this.ShowArgumentErrorMessageToClient();
                    return;
                }

                RolesEntity model = userApp.GetRole(id);
                InitControls(model);
            }
        }
Exemple #2
0
        private RolesEntity GetEntity()
        {
            RolesEntity model = userApp.GetRole(QS("id", 0));

            model.RoleName    = txtRoleName.Text.NoHTML();
            model.Description = txtDesc.Text.NoHTML();
            model.Status      = int.Parse(ddlStatus.SelectedValue);

            return(model);
        }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     userApp = new UserApplication();
     if (!IsPostBack)
     {
         RolesEntity entity = userApp.GetRole(QS("id", 0));
         txtRoleName.Text        = entity.RoleName;
         txtDesc.Text            = entity.Description;
         ddlStatus.SelectedValue = entity.Status.ToString();
     }
 }
Exemple #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int id = QS("id", 0);
         if (id == 0)
         {
             this.ShowArgumentErrorMessageToClient();
             return;
         }
         RolesEntity role = userApp.GetRole(id);
         ltlRole.Text = string.Format("{0}[{1}]", role.RoleName, role.Description);
         InitControl(id);
     }
 }