//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- public void reload() { Billingform bf = new Billingform(user_name, log); bf.Show(); this.Close(); }
private void BtnLogin_Click(object sender, EventArgs e) { User UPName = new User(); UPName.GetUsername = UserName.Text; UPName.GetPassword = maskedTextBox1.Text; if (UserName.Text != " ") { if (UPName.UsernameAuthenticaion()) { if (maskedTextBox1.Text != " ") { if (UPName.PasswordAuthenticaion()) { if (UPName.UserCatagory() == "Admin") { Admin AdminForm = new Admin(this); AdminForm.Show(); this.Hide(); UserName.Text = "UserName"; maskedTextBox1.Text = "Password"; UserName.ForeColor = Color.Gray; maskedTextBox1.ForeColor = Color.Gray; maskedTextBox1.PasswordChar = '\0'; } else if (UPName.UserCatagory() == "User") { Billingform Bill = new Billingform(UPName.GetUsername, this); Bill.Show(); this.Hide(); UserName.Text = "UserName"; maskedTextBox1.Text = "Password"; } } else { MessageBox.Show("Please Enter CORRECT Password"); } } else { MessageBox.Show("password is Empty"); } } else { MessageBox.Show("Please Enter CORRECT Username"); } } else { MessageBox.Show("Username is Empty"); } }
private void BtnLogin_Click(object sender, EventArgs e) { User UPName = new User(); UPName.GetUsername = UserName.Text; UPName.GetPassword = maskedTextBox1.Text; if (UserName.Text != " ") { if (UPName.UsernameAuthenticaion()) { if (maskedTextBox1.Text != " ") { if (UPName.PasswordAuthenticaion()) { if (UPName.UserCatagory() == "Admin") { Admin AdminForm = new Admin(this); AdminForm.Show(); this.Hide(); UserName.Text = "UserName"; maskedTextBox1.Text = "Password"; UserName.ForeColor = Color.Gray; maskedTextBox1.ForeColor = Color.Gray; maskedTextBox1.PasswordChar = '\0'; } else if (UPName.UserCatagory() == "User") { Billingform Bill = new Billingform(UPName.GetUsername, this); Bill.Show(); this.Hide(); UserName.Text = "UserName"; maskedTextBox1.Text = "Password"; } } else { MessageBox.Show("Please Enter CORRECT Password"); } } else { MessageBox.Show("password is Empty"); } } else { MessageBox.Show("Please Enter CORRECT Username"); } } else { MessageBox.Show("Username is Empty"); } }
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- public void reload() { Billingform bf = new Billingform(user_name,log); bf.Show(); this.Close(); }