public override void UpdateList() { switch (_current_action) { case molAction.Add: if (_entity == null) { return; } List.AddItem(_entity.GetInfo(false)); if (FilterType == IFilterType.Filter) { AuditoriaList listA = AuditoriaList.GetList(_filter_results); listA.AddItem(_entity.GetInfo(false)); _filter_results = listA.GetSortedList(); } break; case molAction.Edit: case molAction.Lock: case molAction.Unlock: if (_entity == null) { return; } ActiveItem.CopyFrom(_entity); break; case molAction.Delete: if (ActiveItem == null) { return; } List.RemoveItem(ActiveOID); if (FilterType == IFilterType.Filter) { AuditoriaList listD = AuditoriaList.GetList(_filter_results); listD.RemoveItem(ActiveOID); _filter_results = listD.GetSortedList(); } break; } _entity = null; RefreshSources(); }
protected override void PrintInforme() { if (!AuditoriaFormController.IsActionEnabled(_entity, AccionAuditoria.GENERAR_INFORME_AUDITORIA)) { return; } AuditoriaController.DoAction(_entity, AccionAuditoria.GENERAR_INFORME_AUDITORIA); moleQule.Library.Application.Tools.WordExporter word = new moleQule.Library.Application.Tools.WordExporter(); ClaseAuditoriaInfo clase = ClaseAuditoriaInfo.Get(_tipo_auditoria.OidClaseAuditoria, true); AuditoriaInfo info = _entity.GetInfo(true); word.ExportInformeAuditoria(info.GetPrintObject(clase, _tipo_auditoria, CompanyInfo.GetByCode(AppContext.ActiveSchema.Code))); Estado_TB.Text = _entity.EstadoAuditoriaLabel; }