public frmRegistration() { _errorLogs = new ErrorLogs(); _userTypeRepo = new UserTypeRepo(); _repoLogin = new LoginRepo(); _crypt = new Cryptography(); InitializeComponent(); }
public UpdateUserDetails() { InitializeComponent(); _objUser = new UserRepo(); _objUserType = new UserTypeRepo(); _objCrypto = new Cryptography(); loadUserType(); }
private void LoadInfo() { int id = Utils.CIntDef(Request.QueryString["id"], 0); _UserTypeRepo = new UserTypeRepo(); UserType item = _UserTypeRepo.GetById(id); if (item != null) { txtCode.Disabled = true; txtCode.Value = item.Code; txtName.Value = item.Name; txtPos.Value = Utils.CStrDef(item.Pos, ""); } }
protected void btnSave_Click(object sender, EventArgs e) { int id = Utils.CIntDef(Request.QueryString["id"], 0); _UserTypeRepo = new UserTypeRepo(); UserType item = _UserTypeRepo.GetById(id); if (item != null) { item.Name = txtName.Value; item.Pos = Utils.CIntDef(txtPos.Value, 0); _UserTypeRepo.Update(item); } else { } Response.Redirect("~/pages/user_types.aspx"); }
private void LoadData() { _UserTypeRepo = new UserTypeRepo(); rptList.DataSource = _UserTypeRepo.GetAll(); rptList.DataBind(); }
public UsersDetails() { InitializeComponent(); _objUser = new UserRepo(); _objUserType = new UserTypeRepo(); }