Beispiel #1
0
 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.");
     }
 }
Beispiel #2
0
        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();
        }