public frmCargoHistoria(List <ServiceGridJerarquizadaList> ListaServicio) { InitializeComponent(); var MedicalCenter = new ServiceBL().GetInfoMedicalCenterSede(); int Correlativo = 1; var Parametro = BLL.Utils.GetSystemParameterForCombo(ref objOperationResult, 259, null); ListaServicio.Sort((x, y) => x.d_ServiceDate.Value.CompareTo(y.d_ServiceDate.Value)); foreach (var item in ListaServicio) { oReporteCargoHistorias = new ReporteCargoHistorias(); oReporteCargoHistorias.LogoEmpresaPropietaria = MedicalCenter.b_Image; oReporteCargoHistorias.RazonSocialEmpresaPropietaria = MedicalCenter.v_Name; oReporteCargoHistorias.FechaActual = DateTime.Now.ToString(); oReporteCargoHistorias.SedeEmpresaPropietaria = MedicalCenter.v_Sede; oReporteCargoHistorias.RazonSocialEmpresaCliente = item.v_OrganizationName; oReporteCargoHistorias.Correlativo = Correlativo.ToString(); oReporteCargoHistorias.FechaHoraServicio = item.d_ServiceDate.ToString(); oReporteCargoHistorias.Paciente = item.v_Pacient; oReporteCargoHistorias.TipoEso = item.v_EsoTypeName; oReporteCargoHistorias.Aptitud = item.v_AptitudeStatusName; oReporteCargoHistorias.EmailRepresentanteLegalEP = MedicalCenter.v_Mail; oReporteCargoHistorias.EmailContactoEP = MedicalCenter.v_EmailContacto; oReporteCargoHistorias.Parametro = Parametro[0].Value1 + " - " + Parametro[0].Value2; oReporteCargoHistorias.AnioMes = DateTime.Now.ToString("yyyy/MM"); oSystemParameterBL.ActualizarValorParametro(256, int.Parse(Parametro[0].Value2.ToString())); Correlativo++; ListaCargoHistorias.Add(oReporteCargoHistorias); } }
private void frmReporteCargoFactura_Load(object sender, EventArgs e) { ReporteCargoFactura oReporteCargoFactura = new ReporteCargoFactura(); List <ReporteCargoFactura> Lista = new List <ReporteCargoFactura>(); OperationResult objOperationResult = new OperationResult(); SystemParameterBL oSystemParameterBL = new SystemParameterBL(); var rp = new Reports.crCargoFactura(); var MedicalCenter = new ServiceBL().GetInfoMedicalCenterSede(); var Parametro = BLL.Utils.GetSystemParameterForCombo(ref objOperationResult, 259, null); oReporteCargoFactura.LogoEmpresaPropietaria = MedicalCenter.b_Image; oReporteCargoFactura.RazonSocialEmpresaPropietaria = MedicalCenter.v_Name; oReporteCargoFactura.FechaActual = DateTime.Now.ToString("dd/MMMM/yyyy"); oReporteCargoFactura.SedeEmpresaPropietaria = MedicalCenter.v_Sede; oReporteCargoFactura.RazonSocialEmpresaCliente = Empresa; oReporteCargoFactura.Mes = Mes; oReporteCargoFactura.Fecha = Fecha; oReporteCargoFactura.NroFactura = NroFactura; oReporteCargoFactura.NroTrabajadores = NroTrabajadores; oReporteCargoFactura.EmailRepresentanteLegalEP = MedicalCenter.v_Mail; oReporteCargoFactura.EmailContactoEP = MedicalCenter.v_EmailContacto; oReporteCargoFactura.Parametro = Parametro[0].Value1 + " - " + Parametro[0].Value2; oReporteCargoFactura.AnioMes = DateTime.Now.ToString("yyyy/MM"); oSystemParameterBL.ActualizarValorParametro(256, int.Parse(Parametro[0].Value2.ToString())); Lista.Add(oReporteCargoFactura); DataSet ds = new DataSet(); DataTable dt = Sigesoft.Node.WinClient.BLL.Utils.ConvertToDatatable(Lista); dt.TableName = "dtCargoFactura"; ds.Tables.Add(dt); rp.SetDataSource(ds); crystalReportViewer1.ReportSource = rp; crystalReportViewer1.Show(); }