private void btBack_Click(object sender, EventArgs e)
        {
            SalesOrderHeaderForm f = new SalesOrderHeaderForm();

            f.ShowDialog();
            this.Close();
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //****************TRY*****************//
            if (txtbUsername.Text == string.Empty || txtbPassword.Text == string.Empty)
            {
                MessageBox.Show("Please enter username or password first");
                return;
            }

            string username = txtbUsername.Text.ToString();
            string password = txtbPassword.Text.ToString();

            if (username == "admin" && password == "admin")
            {
                this.Hide();
                SalesOrderHeaderForm f = new SalesOrderHeaderForm();
                f.ShowDialog();
                this.Close();
            }
            else
            {
                MessageBox.Show("Username or password is invalid");
            }
        }