Ejemplo n.º 1
0
        /// <summary>
        /// Author          Date        Comment
        /// BONGVX                      Them thong tin user
        /// </summary>
        void actionMenuUsers_PressNew(object sender, EventArgs e)
        {
            List <Account> lstAcc = new List <Account>();

            lstAcc = mAccountBiLL.getElements();
            frmStanUsers ofrmStanUsers = new frmStanUsers(mAccount);

            ofrmStanUsers.ShowDialog();
            List <Account> lstAccNow = mAccountBiLL.getElements();

            if (lstAcc.Count < lstAccNow.Count)
            {
                DialogResult h = MessageBox.Show("Bạn có muốn thiết lập quyền cho người dùng mới?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (h == DialogResult.Yes)
                {
                    this.Controls.Clear();
                    Account newAccount = new Account();
                    newAccount = lstAccNow.LastOrDefault();
                    UseControls.uQuanLyUser oUQuanLyUser = new uQuanLyUser(mAccount, newAccount.UserId);
                    this.Controls.Add(oUQuanLyUser);
                }
            }
            DisplayListUsers();
        }
 private void navBarItemUsers_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
 {
     plMain.Controls.Clear();
     UseControls.uQuanLyUser oUQuanLyUser = new UseControls.uQuanLyUser(mAccount);
     plMain.Controls.Add(oUQuanLyUser);
 }