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); } }
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); }
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(); } }
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); } }