protected override void SubmitAction() { _tipo = (ETipoAlbaranes)Enum.Parse(typeof(ETipoAlbaranes), this.TipoAlbaran_CB.Text); long serie = TodosSerie_CkB.Checked ? 0 : _serie.Oid; OutputDeliveryList lista = null; switch (this._tipo) { case ETipoAlbaranes.Todos: case ETipoAlbaranes.Lista: lista = OutputDeliveryList.GetList(true, 0, ETipoEntidad.Cliente, serie, this.FInicial_DTP.Value, this.FFinal_DTP.Value); break; case ETipoAlbaranes.Facturados: lista = OutputDeliveryList.GetFacturados(true, 0, serie, this.FInicial_DTP.Value, this.FFinal_DTP.Value); break; case ETipoAlbaranes.NoFacturados: lista = OutputDeliveryList.GetNoFacturados(true, 0, serie, this.FInicial_DTP.Value, this.FFinal_DTP.Value); break; case ETipoAlbaranes.Agrupados: lista = OutputDeliveryList.GetNoFacturadosAgrupados(serie, this.FInicial_DTP.Value, this.FFinal_DTP.Value, true); break; } if (this.Listado_RB.Checked) { if (this.Detallado_RB.Checked) { this.PrintDetail(this._lista); } else { this.PrintList(this._lista); } } else if (this.Detallado_RB.Checked) { this.PrintDetail(lista); } else { this.PrintList(lista); } _action_result = DialogResult.OK; }
protected override void RefreshMainData() { PgMng.Grow(string.Empty, "OutputDelivery"); _selectedOid = ActiveOID; switch (DataType) { case EntityMngFormTypeData.Default: switch (_delivery_type) { case ETipoAlbaranes.Todos: if (Library.Common.ModulePrincipal.GetUseActiveYear()) { List = OutputDeliveryList.GetList(false, _holder_type, Library.Common.ModulePrincipal.GetActiveYear().Year); } else { List = OutputDeliveryList.GetList(false, _holder_type); } break; case ETipoAlbaranes.Facturados: if (Library.Common.ModulePrincipal.GetUseActiveYear()) { List = OutputDeliveryList.GetFacturados(false, Library.Common.ModulePrincipal.GetActiveYear().Year); } else { List = OutputDeliveryList.GetFacturados(false); } break; case ETipoAlbaranes.NoFacturados: if (Library.Common.ModulePrincipal.GetUseActiveYear()) { List = OutputDeliveryList.GetNoFacturados(true, _oid_client, _oid_serie, Library.Common.ModulePrincipal.GetActiveYear().Year); } else { List = OutputDeliveryList.GetNoFacturados(true, _oid_client, _oid_serie); } break; case ETipoAlbaranes.Agrupados: if (Library.Common.ModulePrincipal.GetUseActiveYear()) { List = OutputDeliveryList.GetAgrupados(false, Library.Common.ModulePrincipal.GetActiveYear().Year); } else { List = OutputDeliveryList.GetAgrupados(false); } break; case ETipoAlbaranes.Work: if (Library.Common.ModulePrincipal.GetUseActiveYear()) { List = OutputDeliveryList.GetWorkList(false, Library.Common.ModulePrincipal.GetActiveYear().Year); } else { List = OutputDeliveryList.GetWorkList(false); } break; } break; case EntityMngFormTypeData.ByParameter: _sorted_list = List.GetSortedList(); break; } PgMng.Grow(string.Empty, "Lista de Albaranes"); }