コード例 #1
0
        public IHttpActionResult GetCostoAnticipado(int AlumnoId, int Anio, int PeriodoId)
        {
            var Result = BLLCuota.TraerOfertasCuotasAlumno(AlumnoId, Anio, PeriodoId);

            if (Result.ToString().Contains("Oferta_Costo") || Result.ToString().Contains("[]"))
            {
                return(Ok(Result));
            }
            else
            {
                return(BadRequest("Fallo al momento de consultar, " + Result.GetType().GetProperty("Message").GetValue(Result, null)));
            }
        }
コード例 #2
0
        public async Task CrearReporteAsync()
        {
            try
            {
                Tuple <List <CString_Alumno>, List <CString_OfertaEducativa>, List <CString_Cuota> > ObjetoCompuesto =
                    await BLLCuota.CuotaCredencial(AlumnoId, OfertaEducativaid);

                string rutarpt = "/Reportes/Reportes/EntregaCredenciales.rpt";
                EntregaCredenciales ReporteCredenciales = new EntregaCredenciales();

                ReporteCredenciales.Load(rutarpt);

                ReporteCredenciales.Database.Tables["Alumno"].SetDataSource(ObjetoCompuesto.Item1);
                ReporteCredenciales.Database.Tables["OfertaEducativa"].SetDataSource(ObjetoCompuesto.Item2);
                ReporteCredenciales.Database.Tables["Cuota"].SetDataSource(ObjetoCompuesto.Item3);
                string ruta = Path.GetTempPath();
                ruta += "Credencial.pdf";

                //CrystalReportViewer1.ReportSource = rptCredenciales;
                Stream pdf;
                ReporteCredenciales.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, ruta);

                pdf = ReporteCredenciales.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
                var MemoryStream = new MemoryStream();
                pdf.CopyTo(MemoryStream);

                Response.Expires = 0;
                Response.Buffer  = true;
                Response.ClearContent();
                Response.ContentType = "application/pdf";
                Response.AddHeader("content-length", MemoryStream.Length.ToString());
                Response.BinaryWrite(MemoryStream.ToArray());
                MemoryStream.Close();
            }
            catch (Exception error)
            {
                //Label lblerror = new Label
                //{
                //    Text = "Error: " + error.InnerException.Message
                //};

                //Header.Controls.Add(lblerror);
                Response.Write(error);
            }
        }
コード例 #3
0
 public IHttpActionResult Ofertas_costos_Alumno(string AlumnoId, string Anio, string PeriodoId)
 {
     return(Ok(BLLCuota.TraerOfertasCuotasAlumno(int.Parse(AlumnoId), int.Parse(Anio), int.Parse(PeriodoId))));
 }
コード例 #4
0
 public object Ofertas_costos_Alumno(string AlumnoId, string Anio, string PeriodoId)
 {
     return(BLLCuota.TraerOfertasCuotasAlumno(int.Parse(AlumnoId), int.Parse(Anio), int.Parse(PeriodoId)));
 }
コード例 #5
0
 public DTOCuota TraerCuotaUnPago(string OfertaEducativa, string PagoPlan, string Periodo)
 {
     return(BLLCuota.CuotaUnPago(int.Parse(OfertaEducativa), int.Parse(PagoPlan), Periodo));
 }