private void LogInButton_Click(object sender, EventArgs e) { DataTable dt = controllerObj.AirportLoginVerfication(userntextbox.Text, passtextbox.Text); if (dt != null) { DataRow row = dt.Rows[0]; int LevelAccess = (int)row["LevelAccess"]; int ID = (int)row["ID"]; if (LevelAccess > 2) { AirportAdminFunctionalities f = new AirportAdminFunctionalities(ID, this); f.Show(); this.Hide(); } else { AirportEmployeeFunctionalities f = new AirportEmployeeFunctionalities(ID, this); f.Show(); this.Hide(); } } else { MessageBox.Show("Wrong Username or password!"); } }
private void button2_Click(object sender, EventArgs e) { portAdminFunc.Show(); this.Hide(); }