예제 #1
0
 public PasseggeroStatusChanger(Popup containerPopup, Spostamento partecipante, Geoposition location)
 {
     this.InitializeComponent();
     this.containerPopup = containerPopup;
     this.partecipante   = partecipante;
     this.location       = location;
     dbMan = new DBManager();
 }
예제 #2
0
 public SpostamentoDTO New(SpostamentoDTO DTO)
 {
     using (CaronteContext caronteCtx = new CaronteContext())
     {
         Spostamento tmp = DTO.ToEntity();
         caronteCtx.Spostamento.Add(tmp);
         caronteCtx.SaveChanges();
         return(this.Get(tmp.IDSpostamento));
     }
 }
예제 #3
0
 public SpostamentoDTO Update(SpostamentoDTO DTO)
 {
     using (CaronteContext caronteCtx = new CaronteContext())
     {
         Spostamento tmpAna = caronteCtx.Spostamento.Find(DTO.IDSpostamento);
         DTO.ToEntity(tmpAna);
         caronteCtx.SaveChanges();
         return(this.Get(tmpAna.IDSpostamento));
     }
 }
예제 #4
0
        public void PasseggeroSelected(Spostamento dataContext)
        {
            Popup pop = new Popup();

            pop.Closed          += pop_Closed;
            pop.Child            = new PasseggeroStatusChanger(pop, dataContext, currentPosition);
            pop.HorizontalOffset = (Window.Current.Bounds.Width - 800) / 2;
            pop.VerticalOffset   = (Window.Current.Bounds.Height - 500) / 2;
            pop.IsOpen           = true;
        }
예제 #5
0
        private async Task ReloadListaPartecipanti()
        {
            List <Partecipante> partTotali = await dbMan.cmDB.Table <Partecipante>().Where(part => part.FKIDViaggio == ViaggioInCorso.IDViaggio).ToListAsync();

            ListaPasseggeri = new ObservableCollection <Spostamento>(partTotali.Where(p => p.FKIDStato < 3).Select(p => Spostamento.FromPartecipante(p)).OrderBy(x => (x.Orario - DateTime.Now)).ToList());



            eventAggregator.PublishOnUIThread(ListaPasseggeri);
        }