Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 private void frmLogin_Load(object sender, EventArgs e)
 {
     this.Text = "Đăng nhập" + ConstantInfo.MESSAGE_TITLE;
     _userBOL = new UserFactory();
 }
Exemplo n.º 3
0
 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();
 }
Exemplo n.º 4
0
 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());
 }