예제 #1
0
        private void btnAdminLogin_Click_1(object sender, EventArgs e)
        {
            if (textBoxAdminID.Text.Trim() == string.Empty)
            {
                MessageBox.Show("Admin ID is Required  ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                textBoxAdminID.Clear();
                textBoxAdminID.Focus();
            }

            else if (textBoxAdminPass.Text.Trim() == string.Empty)
            {
                MessageBox.Show("Password is Required  ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                textBoxAdminPass.Clear();
                textBoxAdminPass.Focus();
            }
            else if (textBoxAdminID.Text == IDPASS && textBoxAdminPass.Text == IDPASS)
            {
                frmAdminMain frm = new frmAdminMain();
                frm.Show();
                this.Hide();
            }

            else
            {
                MessageBox.Show("Admin ID or Password is Invalid  ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btnCancle_Click(object sender, EventArgs e)
        {
            frmAdminMain frm = new frmAdminMain();

            frm.Show();
            this.Hide();
        }