private void button_authenticate_Click(object sender, EventArgs e) { AuthenticationProcedure ap=new AuthenticationProcedure(); if (textBox_username.Text.Equals("") || textBox_password.Text.Equals("")) { label_errmsg.Text="Please give your valid username or password!!!"; label_errmsg.ForeColor=System.Drawing.Color.Red; } else if(ap.authenticationCheck(textBox_username.Text,textBox_password.Text)) { Home hm=new Home(textBox_username.Text); this.Hide(); hm.Show(); } else { label_errmsg.Text="Please give your valid username or password!!!"; label_errmsg.ForeColor=System.Drawing.Color.Red; } }
public AdminHome(Admin admin = null, Home home = null) { InitializeComponent(); this.admin = admin; this.home = home; }
private void homeToolStripMenuItem_Click(object sender, EventArgs e) { this.Hide(); Home hm = new Home(); hm.Show(); }