//FUNCIONES DE BUSQUEDA DE CLIENTE public bool searchCliente(String RFC) { BD bd = new BD(); List<String[]> data; data = bd.Execute("SELECT * FROM cliente WHERE RFC = '" + RFC + "';"); foreach (String[] cad in data) { this.RFC = cad[0]; this.Nombre = cad[1]; this.Colonia = cad[2]; this.Calle = cad[3]; this.Numero = cad[4]; this.NumInt = cad[5]; this.CodigoPostal =Convert.ToInt32(cad[6]); this.DelegMunip = cad[7]; this.Estado = cad[8]; this.Correo = cad[9]; this.Telefono = cad[10]; } if (String.IsNullOrEmpty(this.RFC)) return false; return true; }
private void getFolio() { BD bd = new BD(); List<String[]> rs =bd.Execute("SELECT Folio FROM factura ORDER BY Folio ASC"); if (rs.Count != 0) { foreach (String[] data in rs) { folio = Convert.ToInt32(data[0]); folio++; } } }