protected override void PrintFaltasAsistencia() { InformesReportMng reportMng = new InformesReportMng(AppContext.ActiveSchema); FaltasByAlumnoRpt report = null; bool defecto = moleQule.Library.Instruction.ModulePrincipal.GetImpresionEmpresaDefaultBoolSetting(); CompanyInfo empresa = null; if (defecto) { empresa = CompanyInfo.Get(moleQule.Library.Instruction.ModulePrincipal.GetImpresionEmpresaDefaultOidSetting(), false); } while (empresa == null) { moleQule.Face.Common.CompanySelectForm form = new Common.CompanySelectForm(this); DialogResult result = form.ShowDialog(); try { if (result == DialogResult.OK) { empresa = form.Selected as CompanyInfo; } } catch { empresa = null; } } string promos = string.Empty; foreach (Alumno_Promocion ap in _entity.Promociones) { promos += ap.Promocion + "; "; } FaltaAlumnoList list = FaltaAlumnoList.GetListByAlumno(false, _entity.Oid); report = reportMng.GetDetailReport(empresa, EntityInfo.GetPrintObject(), promos, list); if (report != null) { report.SetParameterValue("Empresa", empresa.Name); report.SetParameterValue("Alumno", _entity.Nombre + " " + _entity.Apellidos); report.SetParameterValue("Promocion", promos); if (empresa.Oid == 2) { ((CrystalDecisions.CrystalReports.Engine.TextObject)(report.Section5.ReportObjects["Text1"])).Color = System.Drawing.Color.FromArgb(13, 176, 46); } ReportViewer.SetReport(report); ReportViewer.ShowDialog(); } else { MessageBox.Show(Resources.Messages.NO_DATA_REPORTS, moleQule.Face.Resources.Labels.ADVISE_TITLE, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
/// <summary>Imprime la lista del objetos /// <returns>void</returns> /// </summary> public override void PrintList() { InformesReportMng reportMng = new InformesReportMng(AppContext.ActiveSchema); RegistroFaltasRpt report = null; bool defecto = moleQule.Library.Instruction.ModulePrincipal.GetImpresionEmpresaDefaultBoolSetting(); CompanyInfo empresa = null; if (defecto) { empresa = CompanyInfo.Get(moleQule.Library.Instruction.ModulePrincipal.GetImpresionEmpresaDefaultOidSetting(), false); } while (empresa == null) { moleQule.Face.Common.CompanySelectForm form = new Common.CompanySelectForm(this); DialogResult result = form.ShowDialog(); try { if (result == DialogResult.OK) { empresa = form.Selected as CompanyInfo; } } catch { empresa = null; } } switch (FilterType) { case IFilterType.None: report = reportMng.GetDetailReport(empresa, _sorted_list); break; case IFilterType.Filter: report = reportMng.GetDetailReport(empresa, _filter_results); break; } if (report != null) { report.SetParameterValue("Empresa", empresa.Name); if (empresa.Oid == 2) { ((CrystalDecisions.CrystalReports.Engine.TextObject)(report.Section5.ReportObjects["Text1"])).Color = System.Drawing.Color.FromArgb(13, 176, 46); } ReportViewer.SetReport(report); ReportViewer.ShowDialog(); } else { MessageBox.Show(Resources.Messages.NO_DATA_REPORTS, moleQule.Face.Resources.Labels.ADVISE_TITLE, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }