private void menuAccName_Click(object sender, EventArgs e)
 {
     if (account == null)
     {
         fLogin f = new fLogin();
         f.ShowDialog();
     }
 }
        public fGeneral()
        {
            InitializeComponent();
            this.IsMdiContainer = true;
            this.Show();

            fLogin f = new fLogin();

            fLogin.myevent += updateAccount;
            f.ShowDialog();
        }
        private void menuLogout_Click(object sender, EventArgs e)
        {
            this.Enabled = false;
            fLogin f = new fLogin(this.loginAccount);

            f.ShowDialog();
            this.Enabled = true;

            // menuAccName.Text = this.loginAccount.DisplayName;
            // MainMenuStrip.Location = new Point(780 - (this.loginAccount.DisplayName.Length)*5, MainMenuStrip.Location.Y);
            //if (this.loginAccount.Type == 0) menuAdmin.Visible = false;
        }
        private void menuLogout_Click(object sender, EventArgs e)
        {
            account          = null;
            menuAccName.Text = "Đăng nhập";

            menuAdmin.Visible        = false;
            menuInfo.Visible         = false;
            menuLogout.Visible       = false;
            menuTableManager.Visible = false;

            listForm[listForm.Count - 1].Close();
            listForm.RemoveAt(listForm.Count - 1);
            fLogin f = new fLogin();

            f.ShowDialog();
        }