예제 #1
0
        private void PagosPagare(EspPagare pagare)
        {
            string sql = "select distinct Folio,Id1,Fecha1,Importe1,Id2,Fecha2,Importe2,Id3,Fecha3,Importe3,Id4,Fecha4,Importe4,Usr from CSharpPagos where Folio=@Folio and Usr=@Usr";

            using (SqlConnection con = new SqlConnection(c.cadenaConexion))
            {
                con.Open();

                using (SqlCommand comando = new SqlCommand(sql, con))
                {
                    comando.Parameters.Add("@Folio", SqlDbType.Int).Value = cto.FolioContrato;
                    comando.Parameters.Add("@Usr", SqlDbType.Int).Value   = Sesion.ID;

                    SqlDataAdapter da = new SqlDataAdapter(comando);
                    DataTable      dt = new DataTable("CSharpPagos");
                    da.Fill(dt);
                    pagare.SetDataSource(dt);
                }

                con.Close();
            }
        }
예제 #2
0
 public VisorReportes(EspPagare rep)
 {
     InitializeComponent();
     reporte = "Pagare";
     this.crystalReportViewer1.ReportSource = rep;
 }