private void btnLogin_Click(object sender, EventArgs e) { if (txtUserId.Text == "" || txtPhoneNumber.Text == "" || txtPassword.Text == "") { MessageBox.Show("Please Fill all the required fields", "", MessageBoxButtons.OK, MessageBoxIcon.Error); } else if (txtUserId.TextLength != 5) { MessageBox.Show("UserId should contain 5 characters", "", MessageBoxButtons.OK, MessageBoxIcon.Error); } else if (txtPhoneNumber.TextLength != 10) { MessageBox.Show("Please Enter a valid 10 digit number", "", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { CommonFunctionalityBLL cfb = new CommonFunctionalityBLL(); int x = cfb.authenticateCustomer(txtUserId.Text, txtPhoneNumber.Text, txtPassword.Text); if (x == 1) { panel1.Hide(); panel2.Hide(); CustomerBusinessLogicLayer cbl = new CustomerBusinessLogicLayer(); string [] s = new string[2]; string ct; s = cbl.getCustomerNameAndUserTypeByCustomerId(txtUserId.Text); PassingValues.CustomerName = s[0]; ct = s[1]; if (ct == "A") { //MessageBox.Show("CustomerType:Admin"); menustripAdmin.Show(); WelcomePanel.Show(); } else if (ct == "U") { //MessageBox.Show("CustomerType:User"); menustripCustomer.Show(); WelcomePanel.Show(); } PassingValues.CustomerId = txtUserId.Text; lblUserName.Text = PassingValues.CustomerName; } else { MessageBox.Show("Invalid"); } //MessageBox.Show(PassingValues.CustomerName); } }
public WelcomeScreen() { InitializeComponent(); WelcomePanel.Show(); SigninPanel.Hide(); }
private void BackButton_Click(object sender, EventArgs e) { SigninPanel.Hide(); WelcomePanel.Show(); }
private void pictureBox3_Click(object sender, EventArgs e) { // Panel Show/Hide WelcomePanel.Show(); Student_panel.Hide(); }