private void UpdateCollection() { try { QuotePerPeriodoList ListQuoteGuadagnoOriginale = _managerLiquidServices.GetAllRecordQuote_Guadagno(); ListQuoteGuadagno.Clear(); foreach (QuotePerPeriodo quotePerPeriodo in ListQuoteGuadagnoOriginale) { if (quotePerPeriodo.Id_Tipo_Soldi == 16) { ListQuoteGuadagno.Add(quotePerPeriodo); } } ContoCorrenteSelected = new ContoCorrente(); ActualQuote = new QuoteTab(); ValoreInEuro = 0; RecordQuoteGuadagno = new GuadagnoPerQuote(); Causale = ""; ListQuoteInv = _managerLiquidServices.GetQuoteInv(); ListTabQuote = _managerLiquidServices.GetQuoteTab(); ListQuoteDettaglioGuadagno = _managerLiquidServices.GetQuoteGuadagno(2); ListQuoteSintesiGuadagno = _managerLiquidServices.GetQuoteGuadagno(1); ListQuoteSuperSintesiGuadagno = _managerLiquidServices.GetQuoteGuadagno(0); ListLocation = _registryServices.GetRegistryLocationList(); ListTipoSoldi = _registryServices.GetTipoSoldiList(); ListValutePrelievo = _registryServices.GetRegistryCurrencyList(); ListValuteVersGiro = _registryServices.GetRegistryCurrencyList(); } catch (Exception err) { MessageBox.Show("Errore nella richiesta dei dati." + Environment.NewLine + err.Message, "DAF-C Quote Investitori"); } }
private void Init() { #region start command CloseMeCommand = new CommandHandler(CloseMe); InsertCommand = new CommandHandler(SaveCommand, CanSave); ModifyCommand = new CommandHandler(UpdateCommand, CanModify); InsertQuotaCommand = new CommandHandler(SaveCommand, CanSaveQuota); ModifyQuotaCommand = new CommandHandler(UpdateCommand, CanModifyQuota); EraseQuotaCommand = new CommandHandler(DeleteCommand, CanDelete); ClearCommand = new CommandHandler(CleanCommand); #endregion try { #region Inizializzazione Liste ListQuoteInv = new QuoteInvList(); ListTabQuote = new QuoteTabList(); ListMovementType = new RegistryMovementTypeList(); ListInvestitori = new RegistryOwnersList(); ListInvestitori2 = new RegistryOwnersList(); ListGestioni = new RegistryOwnersList(); ListLocation = new RegistryLocationList(); ListQuoteGuadagno = new QuotePerPeriodoList(); ListTipoSoldi = new TipoSoldiList(); ListValutePrelievo = new RegistryCurrencyList(); ListValuteVersGiro = new RegistryCurrencyList(); ListAnni = _managerLiquidServices.GetAnniFromGuadagni(); #endregion #region liste combo RegistryMovementTypeList listaOriginale = new RegistryMovementTypeList(); listaOriginale = _registryServices.GetRegistryMovementTypesList(); foreach (RegistryMovementType registry in listaOriginale) { if (registry.Id_tipo_movimento == 1 || registry.Id_tipo_movimento == 2) { ListMovementType.Add(registry); } } RegistryOwnersList ListaInvestitoreOriginale = new RegistryOwnersList(); ListaInvestitoreOriginale = _registryServices.GetGestioneList(); foreach (RegistryOwner RO in ListaInvestitoreOriginale) { if (RO.Tipologia == "Investitore") { ListInvestitori.Add(RO); ListInvestitori2.Add(RO); } else if (RO.Tipologia == "Gestore") { ListGestioni.Add(RO); } } #endregion UpdateCollection(); } catch (Exception err) { MessageBox.Show("Errore nella richiesta dei dati." + Environment.NewLine + err.Message, "DAF-C Quote Investitori"); } }