private void LoginBtn_Click(object sender, EventArgs e) { ParkingServices.ParkingServices services = new ParkingServices.ParkingServices(); if (FormIsComplete()) { if (Code() != -1 || !Password().Equals("ERROR")) { if (services.AdminChecker(Code(), Password())) { string name = services.GetAdmin(Code()).Name; MessageBox.Show("Bienvenid@."); Menu menu = new Menu(); this.Hide(); menu.SetLabel(name); menu.Show(); } else { MessageBox.Show("Verifique su codigo y/o contraseƱa e intentelo de nuevo..."); } } } else { MessageBox.Show(@"Por favor completa los todos campos."); } }
static void Main(string[] args) { Console.WriteLine("Bienvenidos"); ParkingServices.ParkingServices parking = new ParkingServices.ParkingServices(); //parking.GetAdmins(); if (parking.AdminChecker(1, "qwerty")) { Console.Write("Exists \n"); } Console.Write("Presione cualquier tecla para salir..."); Console.ReadKey(); }