/// <summary> /// Implementa Save_button_Click /// </summary> protected override void BkSubmitAction() { PgMng.Reset(4, 1, Face.Resources.Messages.RETRIEVING_DATA); long oid_auditoria = TodosAuditorias_CkB.Checked ? -1 : _auditoria.Oid; long oid_plan = TodosPlanes_CkB.Checked ? -1 : _plan.Oid; _estado = !TodosEstados_CkB.Checked ? EstadoAuditoria.CREADA : (EstadoAuditoria)Enum.Parse(typeof(EstadoAuditoria), Estado_CB.Text); long estado = TodosEstados_CkB.Checked ? -1 : (long)_estado; DateTime f_ini = FInicial_DTP.Checked ? FInicial_DTP.Value : DateTime.MinValue; DateTime f_fin = FFinal_DTP.Checked ? FFinal_DTP.Value : DateTime.MaxValue; DateTime f_comunicacion = FComunicacion_DTP.Checked ? FComunicacion_DTP.Value : DateTime.MinValue; string filtro = GetFilterValues(); PgMng.Grow(); moleQule.Library.Application.Tools.WordExporter word = new moleQule.Library.Application.Tools.WordExporter(); AuditoriaList lista = AuditoriaList.GetAbiertasList(oid_auditoria, oid_plan, estado, f_ini, f_fin, f_comunicacion, FInicial_DTP.Checked, FFinal_DTP.Checked, FComunicacion_DTP.Checked); word.ExportSeguimientoAuditorias(lista); PgMng.FillUp(); _action_result = DialogResult.Ignore; }
public AuditoriaSelectForm(Form parent, AuditoriaList lista) : base(true, parent, lista) { InitializeComponent(); _view_mode = molView.Select; DialogResult = DialogResult.Cancel; }
protected new SortedBindingList <AuditoriaInfo> Localize(object value, string column_name) { SortedBindingList <AuditoriaInfo> list = null; AuditoriaList sourceList = null; switch (FilterType) { case IFilterType.None: if (List == null) { MessageBox.Show(moleQule.Face.Resources.Messages.NO_RESULTS); return(null); } sourceList = List; break; case IFilterType.Filter: if (FilteredList == null) { MessageBox.Show(moleQule.Face.Resources.Messages.NO_RESULTS); return(null); } sourceList = FilteredList; break; } FCriteria criteria = null; string related = "none"; switch (column_name) { default: { criteria = GetCriteria(column_name, value, _operation); } break; } switch (related) { case "none": { list = sourceList.GetSortedSubList(criteria); } break; } if (list.Count == 0) { MessageBox.Show(moleQule.Face.Resources.Messages.NO_RESULTS); return(sourceList.GetSortedList()); } DatosSearch.DataSource = list; DatosSearch.MoveFirst(); AddFilterLabel(column_name, value); Tabla.Focus(); return(list); }
public override void RefreshSecondaryData() { _auditorias = AuditoriaList.GetList(false); Bar.Grow(string.Empty, "Discrepancia"); _informes = InformeDiscrepanciaList.GetList(false); Bar.Grow(string.Empty, "Discrepancia"); }
protected new SortedBindingList <AuditoriaInfo> Localize(FilterItem item) { SortedBindingList <AuditoriaInfo> list = null; AuditoriaList sourceList = null; switch (FilterType) { case IFilterType.None: if (List == null) { MessageBox.Show(Face.Resources.Messages.NO_RESULTS); return(null); } sourceList = List; break; case IFilterType.Filter: if (FilteredList == null) { MessageBox.Show(Face.Resources.Messages.NO_RESULTS); return(null); } sourceList = FilteredList; break; } if (item.FilterProperty == IFilterProperty.All) { FCriteria criteria = GetCriteria(string.Empty, item.Value, null, item.Operation); list = sourceList.GetSortedSubList(criteria, _properties_list); } else { FCriteria criteria = GetCriteria(item.Column, item.Value, null, item.Operation); list = sourceList.GetSortedSubList(criteria, _properties_list); } if (list.Count == 0) { MessageBox.Show(Face.Resources.Messages.NO_RESULTS); return(sourceList.GetSortedList()); } DatosSearch.DataSource = list; DatosSearch.MoveFirst(); AddFilterLabel(item); return(list); }
public AuditoriaMngForm(bool isModal, Form parent, AuditoriaList list) : base(isModal, parent, list) { InitializeComponent(); SetView(molView.Normal); // Parche para poder abrir el formulario en modo diseño y no perder la configuracion de columnas DatosLocal_BS = Datos; Tabla.DataSource = DatosLocal_BS; TablaBase = Tabla; base.SortProperty = Codigo.DataPropertyName; }
public AuditoriaMngForm(bool isModal, Form parent, AuditoriaList list) : base(isModal, parent, list) { InitializeComponent(); SetView(molView.Normal); // Parche para poder abrir el formulario en modo diseño y no perder la configuracion de columnas DatosLocal_BS = Datos; Tabla.DataSource = DatosLocal_BS; SetMainDataGridView(Tabla); Datos.DataSource = AuditoriaList.NewList().GetSortedList(); base.SortProperty = Codigo.DataPropertyName; this.Text = Resources.Labels.AUDITORIA; }
private void PlanAnual_CB_SelectedIndexChanged(object sender, EventArgs e) { if (this is AuditoriaEditForm) { return; } if (PlanAnual_CB.SelectedItem != null && ((ComboBoxSource)PlanAnual_CB.SelectedItem).Oid != 0) { PlanAnualInfo plan = _planes.GetItem(((ComboBoxSource)PlanAnual_CB.SelectedItem).Oid); if (plan != null) { //Hay que buscar todas las auditorías asociadas al plan anual seleccionado long oid_tipo_siguiente = AuditoriaList.GetSiguienteTipoAuditoria(((ComboBoxSource)PlanAnual_CB.SelectedItem).Oid); foreach (Plan_TipoInfo info in plan.PlanesTipos) { if (info.Orden == oid_tipo_siguiente + 1) { TipoAuditoriaInfo tipo = _tipos_auditorias.GetItem(info.OidTipo); _entity.OidPlan = info.OidPlan; _entity.OidTipoAuditoria = info.OidTipo; _entity.OidPlanTipo = info.Oid; _entity.TipoAuditoria = tipo.Numero + " " + tipo.Nombre; TipoAuditoria_TB.Text = _entity.TipoAuditoria; break; } } } _tipo_auditoria = _tipos_auditorias.GetItem(_entity.OidTipoAuditoria); if (_tipo_auditoria != null) { CuestionesAuditoria cuestiones = CuestionesAuditoria.NewChildList(); foreach (CuestionInfo info in _tipo_auditoria.Cuestiones) { CuestionAuditoria cuestion = CuestionAuditoria.NewChild(_entity); cuestion.Numero = info.Numero; cuestion.OidCuestion = info.Oid; cuestion.OidAuditoria = Entity.Oid; cuestiones.AddItem(cuestion); } _entity.Cuestiones = cuestiones; Datos_Cuestiones.DataSource = _entity.Cuestiones; } } }
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(); }
/// <summary> /// Toma la lista de bancos de la base de datos y rellena la tabla. /// </summary> protected override void RefreshMainData() { Bar.Grow(string.Empty, "Auditoria"); _selected_oid = ActiveOID; switch (DataType) { case EntityMngFormTypeData.Default: List = AuditoriaList.GetList(false); break; case EntityMngFormTypeData.ByParameter: _sorted_list = List.GetSortedList(); break; } Bar.Grow(string.Empty, "Lista de Productos"); }
protected override void RefreshMainData() { PgMng.Message = Resources.Messages.RETRIEVING_NOTIFICATIONS; if (List == null) { List = new NotifyEntityList(); } else { List.Clear(); } List = new NotifyEntityList(); DateTime fecha; FechaApuntes_TI.Text = _fecha_apuntes.ToShortDateString(); if (Library.Store.ModulePrincipal.GetNotifyFacturasRecibidas()) { fecha = DateTime.Today.AddDays((double)Library.Store.ModulePrincipal.GetNotifyPlazoFacturasRecibidas()); FacturaRecibidaList = Library.Store.ModuleController.GetFacturasRecibidasPendientes(); List.Add(new NotifyEntity(ETipoNotificacion.GastoPendiente , ETipoEntidad.FacturaRecibida , FacturaRecibidaList.Count , FacturaRecibidaList.TotalPendiente() , String.Format(Store.Resources.Messages.NOFITY_FACTURAS_RECIBIDAS_PENDIENTES, fecha.ToShortDateString()) , FacturaRecibidaList)); } PgMng.Grow(); if (Library.Store.ModulePrincipal.GetNotifyPagos()) { BankAccountList cuentas = BankAccountList.GetList(EEstado.Active, false); PagosBancosList.Clear(); foreach (BankAccountInfo item in cuentas) { fecha = DateTime.Today.AddDays((double)Library.Store.ModulePrincipal.GetNotifyPlazoPagos()); PaymentList pagos_banco = Library.Store.ModuleController.GetPagosPendientesVencimiento(item); PagosBancosList.Add(pagos_banco); List.Add(new NotifyEntity(ETipoNotificacion.PagoBancoPendiente , ETipoEntidad.Pago , pagos_banco.Count , pagos_banco.Total() , item.Entidad , pagos_banco)); } } PgMng.Grow(); if (Library.Store.ModulePrincipal.GetNotifyGastos()) { fecha = DateTime.Today.AddDays((double)Library.Store.ModulePrincipal.GetNotifyPlazoGastos()); GastoList = Library.Store.ModuleController.GetGastosPendientes(); List.Add(new NotifyEntity(ETipoNotificacion.GastoPendiente , ETipoEntidad.Gasto , GastoList.Count , GastoList.TotalPendiente() , String.Format(Store.Resources.Messages.NOFITY_GASTOS_PENDIENTES, fecha.ToShortDateString()) , GastoList)); } PgMng.Grow(); if (Library.Invoice.ModulePrincipal.GetNotifyFacturasEmitidas()) { fecha = DateTime.Today.AddDays((double)Library.Invoice.ModulePrincipal.GetNotifyPlazoFacturasEmitidas()); FacturaList = Library.Invoice.ModuleController.GetFacturasPendientes(); List.Add(new NotifyEntity(ETipoNotificacion.IngresoPendiente , ETipoEntidad.FacturaEmitida , FacturaList.Count , FacturaList.TotalPendiente() , String.Format(Invoice.Resources.Messages.NOFITY_FACTURAS_EMITIDAS_PENDIENTES, fecha.ToShortDateString()) , FacturaList)); } PgMng.Grow(); if (Library.Invoice.ModulePrincipal.GetNotifyCobros()) { fecha = DateTime.Today.AddDays((double)Library.Invoice.ModulePrincipal.GetNotifyPlazoCobros()); CobroList = Library.Invoice.ModuleController.GetCobrosPendientes(); List.Add(new NotifyEntity(ETipoNotificacion.IngresoPendiente , ETipoEntidad.Cobro , CobroList.Count , CobroList.Total() , String.Format(Invoice.Resources.Messages.NOFITY_COBROS_PENDIENTES, fecha.ToShortDateString()) , CobroList)); } PgMng.Grow(); PagosVencidosList = Library.Store.ModuleController.GetPagosVencidosSinApunte(_fecha_apuntes); List.Add(new NotifyEntity(ETipoNotificacion.PagoVencido , ETipoEntidad.Pago , PagosVencidosList.Count , PagosVencidosList.Total() , String.Format(Store.Resources.Messages.NOTIFY_PAGOS_VENCIDOS, _fecha_apuntes.ToShortDateString()) , PagosVencidosList)); PgMng.Grow(); CreditCardList tarjetas = CreditCardList.GetList(ETipoTarjeta.Credito, false); PagosTarjetasList.Clear(); foreach (CreditCardInfo item in tarjetas) { PaymentList pagos_tarjetas = Library.Store.ModuleController.GetPagosTarjetaVencidosSinApunte(_fecha_apuntes, item); PagosTarjetasList.Add(pagos_tarjetas); List.Add(new NotifyEntity(ETipoNotificacion.PagoTarjetaVencido , ETipoEntidad.Pago , pagos_tarjetas.Count , pagos_tarjetas.Total() , item.Nombre , pagos_tarjetas)); } PgMng.Grow(); CobrosVencidosList = Library.Invoice.ModuleController.GetCobrosVencidosSinApunte(_fecha_apuntes); List.Add(new NotifyEntity(ETipoNotificacion.CobroVencido , ETipoEntidad.Cobro , CobrosVencidosList.Count , CobrosVencidosList.Total() , String.Format(Invoice.Resources.Messages.NOTIFY_COBROS_VENCIDOS, _fecha_apuntes.ToShortDateString()) , CobrosVencidosList)); PgMng.Grow(); if (Library.Quality.ModulePrincipal.GetNotifyAuditorias()) { //Auditorías con Plazo Máximo de Generación de Informe de Auditorías próximo a vencer //AuditoriaList auditorias = Library.Quality.ModuleControler.GetAvisoGeneracionInforme(); //foreach (AuditoriaInfo item in auditorias) //{ // List.Add(new NotifyEntity(ETipoNotificacion.InformeNoGenerado // , ETipoEntidad.Auditoria // , item.Referencia)); //} //Auditorías con Plazo Máximo de Notificación de Discrepancias próximo a vencer //Auditorías con Plazo Máximo de Notificación de Fin de Auditoría próximo a vencer //Auditorías con Plazo Máximo de Respuesta de Solicitud de Ampliación próximo a vencer //Auditorías con Discrepancias abiertas próximas a cumplir fecha de cierre AuditoriaList auditorias = Library.Quality.ModuleController.GetAvisoDiscrepanciasAbiertas(); foreach (AuditoriaInfo item in auditorias) { List.Add(new NotifyEntity(ETipoNotificacion.DiscrepanciaAbierta , ETipoEntidad.Auditoria , item.Referencia)); } } }
protected override void SelectEntities(EntidadInfo entidad) { _tipo = entidad.Tipo; _entity_type_oid = entidad.Oid; switch (_tipo) { case "Cliente": { ClienteList clientes = ClienteList.GetList(false); List <ClienteInfo> lista = new List <ClienteInfo>(); foreach (ClienteInfo obj in clientes) { if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null) { lista.Add(obj); } } Datos_Agentes.DataSource = lista; } break; case "Alumno": { AlumnoList alumnos = AlumnoList.GetList(false);; List <AlumnoInfo> lista = new List <AlumnoInfo>(); foreach (AlumnoInfo obj in alumnos) { if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null) { lista.Add(obj); } } Datos_Agentes.DataSource = lista; } break; case "Empleado": { InstructorList empleados = InstructorList.GetList(false); List <InstructorInfo> lista = new List <InstructorInfo>(); foreach (InstructorInfo obj in empleados) { if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null) { lista.Add(obj); } } Datos_Agentes.DataSource = lista; } break; //case "Factura": // { // FacturaList facturas = FacturaList.GetList(false); // List<FacturaInfo> lista = new List<FacturaInfo>(); // foreach (FacturaInfo obj in facturas) // { // if (!entidad.Agentes.ContainsAgent(obj.Oid)) // lista.Add(obj); // } // Datos_Agentes.DataSource = lista; // } // break; case "Auditoria": { AuditoriaList auditorias = AuditoriaList.GetList(); List <AuditoriaInfo> lista = new List <AuditoriaInfo>(); foreach (AuditoriaInfo obj in auditorias) { if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null) { lista.Add(obj); } } Datos_Agentes.DataSource = lista; } break; case "Proveedor": { ProveedorList proveedores = ProveedorList.GetList(false); List <ProveedorInfo> lista = new List <ProveedorInfo>(); foreach (ProveedorInfo obj in proveedores) { if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null) { lista.Add(obj); } } Datos_Agentes.DataSource = lista; } break; case "Promocion": { PromocionList promociones = PromocionList.GetList(false); List <PromocionInfo> lista = new List <PromocionInfo>(); foreach (PromocionInfo obj in promociones) { if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null) { lista.Add(obj); } } Datos_Agentes.DataSource = lista; } break; case "Curso": { CursoList cursos = CursoList.GetList(false); List <CursoInfo> lista = new List <CursoInfo>(); foreach (CursoInfo obj in cursos) { if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null) { lista.Add(obj); } } Datos_Agentes.DataSource = lista; } break; case "Modulo": { ModuloList modulos = ModuloList.GetList(false); List <ModuloInfo> lista = new List <ModuloInfo>(); foreach (ModuloInfo obj in modulos) { if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null) { lista.Add(obj); } } Datos_Agentes.DataSource = lista; } break; //default: // _tipo = ""; // throw new iQException("No se ha encontrado el tipo de entidad " + entidad.Tipo); } Format(); }