public void homeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     homeForm = new frmHomePage();
     homeForm.MdiParent = this;
     homeForm.WindowState = FormWindowState.Maximized;
     homeForm.Show();
 }
示例#2
0
 public void homeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     homeForm             = new frmHomePage();
     homeForm.MdiParent   = this;
     homeForm.WindowState = FormWindowState.Maximized;
     homeForm.Show();
 }
        private void loginButton_Click(object sender, EventArgs e)
        {
            EShoppingLibrary.Customers aCus = new EShoppingLibrary.Customers();
            string username = usernameTextBox.Text;
            string password = passwordTextBox.Text;

            int res = aCus.ValidateCustomer(username, password);

            if (res == 1)
            {
                Program.currentMainForm.EnableMenuItems(username);
                frmHomePage home = new frmHomePage();
                home.MdiParent = this.MdiParent;
                home.Show();
                this.Close();
            }
            else
            {
                MessageBox.Show("Please check your username and password provided...");
            }
        }