private void btnBack_Click(object sender, EventArgs e) { this.Hide(); AdminMain f = new AdminMain(); f.ShowDialog(); }
private void btnLogin_Click(object sender, EventArgs e) { BusinessMetaLayer ln = BusinessMetaLayer.instance(); user = ln.farmLogin(Tester.Text, txtPassword.Text); if (user[0] == 0) { this.Hide(); AdminMain n = new AdminMain(); n.ShowDialog(); } else if (user[0] == 1) { this.Hide(); LabourerMain n = new LabourerMain(user[1]); n.ShowDialog(); } else if (user[0] == -1) { MessageBox.Show("Please Enter a valid 'Username' & 'Password' in the fields provided!"); } else { MessageBox.Show("Username / password combimation incorrect"); } }