public static ClientListViewModel Get() { ClientListViewModel list = new ClientListViewModel(); ClienteList sourceList = ClienteList.GetList(); foreach (ClienteInfo item in sourceList) { list.Add(ClientViewModel.New(item)); } return(list); }
public override void UpdateList() { switch (_current_action) { case molAction.Add: case molAction.Copy: if (_entity == null) { return; } List.AddItem(_entity.GetInfo(false)); if (FilterType == IFilterType.Filter) { ClienteList list = ClienteList.GetList(_filter_results); list.AddItem(_entity.GetInfo(false)); _filter_results = list.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) { ClienteList list = ClienteList.GetList(_filter_results); list.RemoveItem(ActiveOID); _filter_results = list.GetSortedList(); } break; } RefreshSources(); if (_entity != null) { Select(_entity.Oid); } _entity = null; }
public override void PrintList() { PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this); ClienteReportMng reportMng = new ClienteReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues); PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); ClienteListRpt report = reportMng.GetListReport(ClienteList.GetList((IList <ClienteInfo>)Datos.List)); PgMng.FillUp(); ShowReport(report); }
protected void PrintDetail(OutputDeliveryList lista) { PgMng.Reset(4, 1, Face.Resources.Messages.LOADING_DATA, this); ClienteList clientes = ClienteList.GetList(false); PgMng.Grow(); OutputDeliveryReportMng rptMng = new OutputDeliveryReportMng(AppContext.ActiveSchema, this.Text, string.Empty); ReportClass report = rptMng.GetDetailListReport(lista, clientes, this._tipo, this.FInicial_DTP.Value, this.FFinal_DTP.Value); PgMng.FillUp(); ShowReport(report); }
protected void PrintList(OutputDeliveryList lista) { PgMng.Reset(4, 1, Face.Resources.Messages.LOADING_DATA, this); ClienteList clientes = ClienteList.GetList(false); PgMng.Grow(); OutputDeliveryReportMng rptMng = new OutputDeliveryReportMng(AppContext.ActiveSchema, Titulo, Filtro); ReportClass report = rptMng.GetListReport(lista, clientes); PgMng.FillUp(); ShowReport(report); }
protected override void RefreshMainData() { PgMng.Grow(string.Empty, "Clientes"); _selectedOid = ActiveOID; switch (DataType) { case EntityMngFormTypeData.Default: List = ClienteList.GetList(_estado, false); break; case EntityMngFormTypeData.ByParameter: _sorted_list = List.GetSortedList(); break; } PgMng.Grow(string.Empty, "Lista de Clientes"); }
protected override void PrintAction() { PgMng.Reset(4, 1, Face.Resources.Messages.RETRIEVING_DATA, this); ClienteInfo cliente = TodosCliente_CkB.Checked ? null : _cliente; SerieInfo serie = TodosSerie_CkB.Checked ? null : _serie; FormatConfCarteraClientesReport conf = new FormatConfCarteraClientesReport(); conf.tipo = (ETipoFacturas)(long)TipoFactura_CB.SelectedValue; conf.orden_ascendente = Ascendente_RB.Checked; conf.resumido = Resumido_RB.Checked; conf.verCobros = Detallado_RB.Checked; conf.campo_ordenacion = Ordenar_CB.SelectedItem.ToString(); if (FInicial_DTP.Checked) { conf.inicio = FInicial_DTP.Value; } else { conf.inicio = DateTime.MinValue; } if (FFinal_DTP.Checked) { conf.final = FFinal_DTP.Value; } else { conf.final = DateTime.MaxValue; } string filtro = GetFilterValues(); PgMng.Grow(); ClienteList clientes = ClienteList.GetList(false); //Quitamos el cliente CONSUMO PROPIO por peticion del Balaños ClienteInfo cp = clientes.GetItemByProperty("Nombre", "CONSUMO PROPIO"); if (cp != null) { clientes.RemoveItem(cp.Oid); } PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT); ClienteReportMng reportMng = new ClienteReportMng(AppContext.ActiveSchema, this.Text, filtro); if (!TodosCliente_CkB.Checked) { InformeCarteraClientesRpt rpt = reportMng.GetCarteraClientesReport(_cliente, _serie, conf); PgMng.FillUp(); ShowReport(rpt); } else { InformeCarteraClientesRpt rpt = reportMng.GetCarteraClientesReport(clientes, _serie, conf); PgMng.FillUp(); ShowReport(rpt); } _action_result = DialogResult.Ignore; }
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(); }