private void frmUser_Load(object sender, EventArgs e) { this.Text = "Quan ly nguoi dung" + ConstantInfo.MESSAGE_TITLE + GlobalInfo.CompanyName; // Show form to the center this.Location = new Point((this.ParentForm.Width - this.Width) / 2, (this.ParentForm.Height - this.Height) / 2); _userBOL = new UserFactory(); grvUser.AutoGenerateColumns = false; var users = UserFactory.SelectAllUser(); BindData(users); btnAdd.Enabled = _userInfo.UserPermission.Contains(ConstantInfo.PERMISSON_TAO_MOI_NGUOI_DUNG); btnUpdate.Enabled = _userInfo.UserPermission.Contains(ConstantInfo.PERMISSON_CAP_NHAT_NGUOI_DUNG); btnDelete.Enabled = _userInfo.UserPermission.Contains(ConstantInfo.PERMISSON_XOA_NGUOI_DUNG); }
private void frmLogin_Load(object sender, EventArgs e) { this.Text = "Đăng nhập" + ConstantInfo.MESSAGE_TITLE; _userBOL = new UserFactory(); }
private void frmAddUser_Load(object sender, EventArgs e) { this.Text = "Thông tin người dùng" + ConstantInfo.MESSAGE_TITLE; // Show form to the center this.Location = new Point((this.ParentForm.Width - this.Width) / 2, (this.ParentForm.Height - this.Height) / 2); _userBOL = new UserFactory(); _permissionBOL = new PermissionFactory(); Init(); }
private void frmUser_Load(object sender, EventArgs e) { this.Text = "Quản lý người dùng" + ConstantInfo.MESSAGE_TITLE; // Show form to the center this.Location = new Point((this.ParentForm.Width - this.Width) / 2, (this.ParentForm.Height - this.Height) / 2); _userBOL = new UserFactory(); grvUser.AutoGenerateColumns = false; BindData(_userBOL.SelectAll()); }