static void Main(string[] args) { logear log = new logear(); encabezados tit = new encabezados(); int a = 0; Console.Clear(); tit.patos(); while (a == 0) { Console.WriteLine(); Console.Write("1) iniciar sesion\n2) salir\nque desea hacer: "); int x = int.Parse(Console.ReadLine()); if (x == 1) { log.IniciarSesion(); a = 0; } if (x == 2) { a = 1; } } }
public void ven() { consultas con = new consultas(); facturarinventario fac = new facturarinventario(); logear log = new logear(); encabezados tit = new encabezados(); int res; int xd = 0; while (xd == 0) { Console.WriteLine(); Console.Write("1) cargar inventario\n2) facturar productos\n3) cerrar sesion\nQue desea hacer: "); res = int.Parse(Console.ReadLine()); if (res == 1) { fac.cargar(); xd = 0; } if (res == 3) { Console.Clear(); tit.patos(); xd = 1; } if (res == 2) { fac.facturar(); Console.WriteLine(); Console.Write("GRACIAS POR SU COMPRA"); xd = 0; } } }
public void admin() { logear log = new logear(); encabezados tit = new encabezados(); crearusuario agr = new crearusuario(); consultas con = new consultas(); int res; int a = 0; int b = 0; while (a == 0) { Console.WriteLine(); Console.Write("1) crear usuario\n2) consultas\n3) cerrar sesion\nQue desea hacer: "); res = int.Parse(Console.ReadLine()); if (res == 3) { Console.Clear(); tit.patos(); a = 1; } if (res == 1) { agr.agregar(); a = 0; } if (res == 2) { Console.Clear(); tit.patos(); Console.Write("1) ver usuarios\n2) ver inventario\n3) ver todas las facturas\n4) regresar\nQue desea hacer: "); b = int.Parse(Console.ReadLine()); if (b == 1) { Console.WriteLine(); con.users(); } if (b == 2) { Console.WriteLine(); con.inventario(); } if (b == 3) { Console.WriteLine(); con.facturas(); } if (b == 4) { a = 0; } } } }