//private void AssignEvents() //{ // btnCancle.Click += new EventHandler(this.QuitApplication); // picClose.Click += new EventHandler(this.QuitApplication); // picMinimize.Visible = false; // picMaximize.Visible = false; //} private void btnLogin_Click(object sender, EventArgs e) { bool check = checkInput(); if (check == false) { Int32 checkLogin = balUser.checkUser(txtUserName.Text, txtPassword.Text, Convert.ToInt32(cboUserType.SelectedValue.ToString())); if (checkLogin == 1) { MessageBox.Show("Login Successful", "Login", MessageBoxButtons.OK); this.Hide(); frmMain mainForm = new frmMain(); mainForm.Show(); } } }