private void LoginButton_Click(object sender, EventArgs e) { if (Passowrd_textBox.Text.ToString() == "1234")//Password can be saved in the DB encrypted rather than being hardcoded. { //Login successful Provided_Functionalities f = new Provided_Functionalities(1, this); f.Show(); } else { MessageBox.Show("Password isn't correct, Please Try Again"); } }
private void button1_Click(object sender, EventArgs e) { if (textBox1.Text.ToString() == "1234")//Password can be saved in the DB encrypted rather than being hardcoded. { //Login successful Provided_Functionalities f = new Provided_Functionalities(1); f.Show(); } else { MessageBox.Show("Password isn't correct"); } this.Close(); }
private void Btn_Login_Click(object sender, EventArgs e) { int p = controllerObj.CheckPassword_Basic(TxtBx_username.Text, TxtBx_pass.Text); if (p > 0) { Provided_Functionalities PF = new Provided_Functionalities((Privileges)p); PF.Show(this); TxtBx_pass.Clear(); TxtBx_username.Clear(); this.Hide(); } else { MessageBox.Show("WRONG USERNAME OR PASSWORD!!!"); } }
private void Btn_Login_Click(object sender, EventArgs e) { int privlg = controllerObj.CheckPassword_Basic(TxtBx_username.Text, TxtBx_pass.Text); if (privlg > 0) // Successful Login { _loggedin = true; WrongInput.Visible = false; // Create an Object of "Provided_Functionalities" Form and Show it Provided_Functionalities func = new Provided_Functionalities(this, TxtBx_username.Text, (Privileges)privlg); func.Show(this); TxtBx_pass.Clear(); TxtBx_username.Clear(); // Hide the Login Form // Don't close it because it's the startup form and the application will exit this.Hide(); } else { WrongInput.Visible = true; TxtBx_pass.Clear(); } }
private void button2_Click(object sender, EventArgs e) { Provided_Functionalities f = new Provided_Functionalities(0);//for admin f.Show(); }
private void OthersButton_Click(object sender, EventArgs e) { Provided_Functionalities f = new Provided_Functionalities(0, this);//for admin f.Show(); }