public AddEditHouseholdVM(RescueClient rescueClient, DialogService dialogService, IDialogCoordinator dialogCoordinator) { this.rescueClient = rescueClient; this.dialogService = dialogService; this.dialogCoordinator = dialogCoordinator; }
public IncidentsVM(DialogService dialogService, RescueClient rescueClient, IDialogCoordinator dialogCoordinator) { this.dialogService = dialogService; this.rescueClient = rescueClient; this.dialogCoordinator = dialogCoordinator; LoadIncidents(); MessengerInstance.Register <Messages.AddEditResultMessage <Incident> >(this, rslt => { if (rslt.Error == null) { var existingIncident = Incidents.Where(i => i.id == rslt.Entity.id) .FirstOrDefault(); DispatcherHelper.CheckBeginInvokeOnUI(() => { if (existingIncident != null) { Incidents.Remove(existingIncident); } Incidents.Add(rslt.Entity); }); } }); }
public AddEditEvacuationVM(RescueClient rescueClient, DialogService dialogService, IDialogCoordinator dialogCoordinator) { this.rescueClient = rescueClient; this.dialogService = dialogService; this.dialogCoordinator = dialogCoordinator; }
public EvacuationListVM(RescueClient client, DialogService dialogService, IDialogCoordinator dialogCoordinator) { _rescueClient = client; this.dialogService = dialogService; this.dialogCoordinator = dialogCoordinator; if (IsInDesignModeStatic) { Centers.Add(new Center { CenterName = "PASALUBONG CENTER", Address = "Sitio Merkado, Catarman, Manila", Limit = 300 }); Centers.Add(new Center { CenterName = "PASALUBONG CENTER", Address = "Sitio Merkado, Catarman, Manila", Limit = 300 }); Centers.Add(new Center { CenterName = "PASALUBONG CENTER", Address = "Sitio Merkado, Catarman, Manila", Limit = 300 }); Centers.Add(new Center { CenterName = "PASALUBONG CENTER", Address = "Sitio Merkado, Catarman, Manila", Limit = 300 }); } else { MessengerInstance.Register <Messages.AddEditResultMessage <Center> >(this, (rslt) => { if (rslt.Error == null) { var oldCenter = Centers.FirstOrDefault(c => c.id == rslt.Entity.id); DispatcherHelper.CheckBeginInvokeOnUI(() => { if (oldCenter != null) { Centers.Remove(oldCenter); } Centers.Add(rslt.Entity); }); MessengerInstance.Send(default(StatsChangedMessage)); } }); CentersCollectionView.CurrentChanged += CentersCollectionView_CurrentChanged; } }
public StatisticsVM(RescueClient rescueClient) { this.rescueClient = rescueClient; ReadStatChanges(); MessengerInstance.Register <Messages.StatsChangedMessage>(this, (statChange) => { ReadStatChanges(); }); }
public TollsVM(RescueClient rescueClient) { this.rescueClient = rescueClient; MessengerInstance.Register <Messages.UpdateTolls>(this, (ut) => { ReadTollChanges(); }); ReadTollChanges(); }
public AddEditPersonVM(RescueClient client, DialogService dialogService, IDialogCoordinator dialog) { _rescueClient = client; _dialogService = dialogService; this.dialog = dialog; MessengerInstance.Register <Dialogs.CapturedPhotoEvenArgs>(this, (p) => { ChoosenPhoto = p.PhotoPath; }); }
public HouseholdsVM(RescueClient rescueClient, DialogService dialogService, IDialogCoordinator dialogCoordinator) { this.dialogService = dialogService; this.dialogCoordinator = dialogCoordinator; this.rescueClient = rescueClient; if (IsInDesignModeStatic) { _households.Add(new DownloadHouseholdModel { Address = "Catbalogan City", HouseCategory = "Mayaman", HouseNumber = "001", members = new List <DownloadPersonModel> { new DownloadPersonModel { FirstName = "arhcie", IsHead = true, Contact = "1234", MiddleName = "Espe", LastName = "Cortez" } } }); _households.Add(new DownloadHouseholdModel { Address = "Catbalogan City", HouseCategory = "Mayaman", HouseNumber = "001", }); } else { MessengerInstance.Register <Messages.AddEditResultMessage <DownloadHouseholdModel> >(this, (rslt) => { if (rslt.Error == null) { var oldHousehold = _households.FirstOrDefault(c => c.id == rslt.Entity.id); DispatcherHelper.CheckBeginInvokeOnUI(() => { if (oldHousehold != null) { _households.Remove(oldHousehold); } _households.Add(rslt.Entity); }); MessengerInstance.Send(new Messages.StatsChangedMessage()); } }); } }
public FamilyMemberSelectorVM(RescueClient rescueClient, IDialogCoordinator dialogCoordinator) { this.rescueClient = rescueClient; this.dialogCoordinator = dialogCoordinator; if (IsInDesignModeStatic) { _allPeople.Add(new DownloadPersonModel { FirstName = "DONATO", MiddleName = "G", LastName = "PORPORA" }); } }
public CenterSelectorVM(RescueClient rescueClient, IDialogCoordinator dialogCoordinator) { this.rescueClient = rescueClient; this.dialogCoordinator = dialogCoordinator; }
public ReportingVM(RescueClient rescueClient, DialogService dialogService) { this.rescueClient = rescueClient; this.dialogService = dialogService; }
public AddEditIncidentVM(RescueClient rescueClient, IDialogCoordinator dialogCoordinator) { this.rescueClient = rescueClient; this.dialogCoordinator = dialogCoordinator; }
public ReportGeneratorVM(RescueClient rescueClient) { this.rescueClient = rescueClient; }
public PeopleVM(RescueClient client, DialogService dialogService, IDialogCoordinator dlgCoordinator) { _dialogService = dialogService; this.dlgCoordinator = dlgCoordinator; _rescueClient = client; if (IsInDesignModeStatic) { People.Add(new DownloadPersonModel { FirstName = "Archie", MiddleName = "Espe", LastName = "Cortez", Birthday = "12/31/2017", Occupation = "TEACHER", Email = "*****@*****.**", IsHead = true, Allergies = "Beauty", BloodType = "A+", CivilStatus = "Married", Contact = "09992458787", EducationalAttainment = "Masters", Gender = "Male", id = 1, MedicalCondition = "SPECIAL", MedicineRequired = "BIBLE", NamePrefix = "Mr", NameSuffix = "III", NationalIdNumber = "0001", Vulnerabilities = "FOOD", }); People.Add(new DownloadPersonModel { FirstName = "Kram", MiddleName = "Espe", LastName = "Airbytes", Birthday = "12/31/2017" }); People.Add(new DownloadPersonModel { FirstName = "Kram", MiddleName = "Espe", LastName = "Airbytes", Birthday = "12/31/2017" }); People.Add(new DownloadPersonModel { FirstName = "Kram", MiddleName = "Espe", LastName = "Airbytes", Birthday = "12/31/2017" }); People.Add(new DownloadPersonModel { FirstName = "Kram", MiddleName = "Espe", LastName = "Airbytes", Birthday = "12/31/2017" }); People.Add(new DownloadPersonModel { FirstName = "Kram", MiddleName = "Espe", LastName = "Airbytes", Birthday = "12/31/2017" }); } else { LoadPeople(); MessengerInstance.Register <AddEditResultMessage <DownloadPersonModel> >(this, (rslt) => { if (rslt.Error == null) { var _p = People.FirstOrDefault(p => p.id == rslt.Entity.id); DispatcherHelper.CheckBeginInvokeOnUI(() => { if (_p != null) { People.Remove(_p); } People.Add(rslt.Entity); }); MessengerInstance.Send(new Messages.StatsChangedMessage()); } }); } }