protected override void OnLoad(EventArgs e) { base.OnLoad(e); id = ConvertHelper.ToInt32(Request["id"]); user = privilege.GetUser(id); if (user == null) { ShowError("该用户不存在"); } if (!X.IsAjaxRequest && !IsPostBack) { _comboStatusStore.DataSource = EnumHelper.GetList(typeof(BaseStatuses), (k, v) => { return(new { Id = k, Name = v }); }); _comboStatusStore.DataBind(); _txtUsername.SetValue(user.Username); _comboStatus.SetValue(user.Status); _txtMemo.SetValue(user.Description); _txtUsername.Disable(); _hidId.SetValue(id); } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); id = ConvertHelper.ToInt32(Request["id"]); user = privilege.GetUser(id); if (user == null) { ShowError("该用户不存在"); } if (!X.IsAjaxRequest && !IsPostBack) { _comboStatusStore.DataSource = EnumHelper.GetList(typeof(BaseStatuses), (k, v) => { return new { Id = k, Name = v }; }); _comboStatusStore.DataBind(); _txtUsername.SetValue(user.Username); _comboStatus.SetValue(user.Status); _txtMemo.SetValue(user.Description); _txtUsername.Disable(); _hidId.SetValue(id); } }