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!");
            }
        }
Пример #2
0
 public FlightsAdminAirportWindow(AirportAdminFunctionalities AAF)
 {
     InitializeComponent();
     ControllerObj = new Controller();
     portAdminFunc = AAF;
 }