Beispiel #1
0
 public bool creaCliente(String RFC, String Nombre, String Colonia, String Calle,String Numero, String NumeroInt, int CodigoPostal, String DelegMunip, String Estado, String Correo, String Telefono)
 {
     BD bd = new BD();
     if (bd.ExecuteNonQuery("INSERT INTO cliente VALUES ('" + RFC + "','" + Nombre + "','" + Colonia + "','" + Calle + "','" + Numero + "','" + NumeroInt + "','" + CodigoPostal + "','" + DelegMunip + "','" + Estado + "','" + Telefono + "','" + Correo + "');"))
     {
         MessageBox.Show("CLIENTE DADO DE ALTA CORRECTAMENTE");
         this.RFC = RFC;
         this.Nombre = Nombre;
         this.Colonia = Colonia;
         this.Calle = Calle;
         this.Numero = Numero;
         this.NumInt = NumeroInt;
         this.CodigoPostal = CodigoPostal;
         this.DelegMunip = DelegMunip;
         this.Estado = Estado;
         this.Telefono = Telefono;
         this.Correo= Correo;
         return true;
     }
     else
     {
         MessageBox.Show("CLIENTE NO DADO DE ALTA CONSULTE AL ADMIN");
         return false;
     }
 }
Beispiel #2
0
        public void pushFactura()
        {
            BD bd = new BD();
            getFolio();
            foreach (Articulo aux in arts)
            {
                bd.ExecuteNonQuery("INSERT INTO articulo VALUES(NULL, '" + aux.nombre + "','" + aux.cantidad.ToString() + "','" + aux.precio.ToString() + "','" + aux.tipo + "',"+folio+");");
            }

            bd.ExecuteNonQuery("INSERT INTO factura VALUES(" + folio + ",'" + cliente.rfc + "','" + DateTime.Today.ToString("yyyy-MM-dd") + "')");
            this.printFact();
        }