/// <summary> /// Ritorno la lista dei fotografi attivi /// </summary> /// <returns></returns> public List <FotografoDto> getListaFotografi() { List <FotografoDto> listaDto = new List <FotografoDto>(); using (new UnitOfWorkScope()) { var linq = UnitOfWorkScope.currentDbContext.Fotografi.Where(f => f.attivo == true); if (Configurazione.UserConfigLumen.filtroFotografiSS == FiltroFotografi.Umani) { linq = linq.Where(f => f.umano == true); } else if (Configurazione.UserConfigLumen.filtroFotografiSS == FiltroFotografi.Automatici) { linq = linq.Where(f => f.umano == false); } var fotografi = linq.OrderBy(f => f.cognomeNome); // Creo la lista contenente gli oggetti di trasporto leggeri che ho ricavato dal servizio core. foreach (var fotografo in fotografi) { FotografoDto dto = new FotografoDto(); dto.id = fotografo.id; dto.nome = fotografo.cognomeNome; dto.immagine = getImmagineFotografo(fotografo); listaDto.Add(dto); } } // ritorno gli oggetti di trasporto al client return(listaDto); }
public SlideShowNxM(SelfMainWindow main, FotografoDto fotografo, DateTime giornataFiltro, String faseDelGiorno) { InitializeComponent(); this.DataContext = this; this.main = main; this.fotografo = fotografo; this.strFaseDelGiorno = faseDelGiorno; this.giornataFiltro = giornataFiltro; SelfMainWindow.isShowLogo = false; SelfMainWindow.isShowSlideShow = true; SelfMainWindow.isShowCarrelli = false; Servizi.Event.EventManager.Instance.setIEventManager(this); //Controllo Mouse _MouseTicker.Tick += new EventHandler(dispatcherTimer_MouseTicker); _MouseTicker.Interval = new TimeSpan(0, 0, 0, 0, 100); _MouseTicker.Start(); SetMyImagePopStoryBoards(); isControlliUtenteAttivi = true; ShowCurrentPageIndex(); FotoSrv.Instance.setFotografo(fotografo.id); FotoSrv.Instance.faseDelGiorno = faseDelGiorno; }
private void ListView_Selected(object sender) { if (!SelfMainWindow.isShowSlideShow) { var item = (sender as ListView).SelectedItem; if (item != null) { FotografoDto c = (FotografoDto)item; main.ContentArea.Content = new SlideShowNxM(main, c, giornataFiltro, strFaseDelGiorno); MoveTimeCounter.Instance.updateLastTime(); } } }
internal FotografoDto[] getListaFotografi() { FotografoDto[] result = new FotografoDto[0]; Open(); try { result = ssClient.getListaFotografi(); } catch (Exception ee) { _giornale.Warn(ee); connectionRestart(); if (isConnectionOK) { return(ssClient.getListaFotografi()); } } return(result); }