public void Obtener_datos_ven(string Fechat) { SqlConnection a = con.conexion(); a.Open(); SqlCommand consultar = new SqlCommand("Select Fecha_venta, Valor_total from Venta where Fecha_venta =" + Fechat, a); SqlDataReader Consu = consultar.ExecuteReader(); if (Consu.Read()) { Reportes repo = new Reportes(); repo.Fecha = Consu.GetString(0); repo.Total = Consu.GetInt64(1); Fecha = repo.Fecha; Total = repo.Total; } a.Close(); }
public void Obtener_datos_tran(string Fechat) { SqlConnection a = con.conexion(); a.Open(); SqlCommand consultar = new SqlCommand("Select Capital_total, Fecha_trans from Transaccion where Fecha_trans =" + Fechat, a); SqlDataReader Consu = consultar.ExecuteReader(); if (Consu.Read()) { Reportes repo = new Reportes(); repo.Capital = Consu.GetInt64(0); repo.Fecha = Consu.GetString(1); Capital = repo.Capital; Fecha = repo.Fecha; } a.Close(); }
public void Obtener_datos_cli(string Fechat, string ID) { SqlConnection a = con.conexion(); a.Open(); SqlCommand consultar = new SqlCommand("Select Cliente.Nombre_cliente, Venta.Fecha_venta, Venta.Valor_total from Cliente inner join Venta on Cliente.Numero_identificacion = Venta.Numero_identificacion where Venta.Fecha_venta ='" + Fechat + "' and Cliente.Numero_identificacion =" + ID, a); SqlDataReader Consu = consultar.ExecuteReader(); if (Consu.Read()) { Reportes repo = new Reportes(); repo.Nombre = Consu.GetString(0); repo.Fecha = Consu.GetString(1); repo.Total = Consu.GetInt64(2); Fecha = repo.Fecha; Total = repo.Total; Nombre = repo.Nombre; } a.Close(); }