public TaskHandler(TaskVm taskVm) { TaskVm = taskVm; _frameNavigation = new FrameNavigateClass(); _collectionsClass = new Collections(); _sortingHandler = new SortingHandler(this); }
public NavigationHelperVm() { CurrentUser = UserSingleton.GetInstance(); TaskSingleton = TaskEquipmentStationSingleton.GetInstance(); _frameNavigation = new FrameNavigateClass(); GoTask = new RelayCommandClass(DoTask); GoDone = new RelayCommandClass(DoDone); DoGoCreate = new RelayCommandClass(GoCreate); UserName = CurrentUser.GetUsername(); UserId = CurrentUser.GetUserID(); }
public async void RemoveNote() { if (_noteVm.SelectedNote.NotesId != 0) { await _deleteNote.Delete("Notes", _noteVm.SelectedNote.NotesId); FrameNavigateClass _frame = new FrameNavigateClass(); _frame.ActivateFrameNavigation(typeof(MenuPage)); MessageDialog msg = new MessageDialog("Note deleted!"); await msg.ShowAsync(); } else { MessageDialog msg = new MessageDialog("Please select the note."); await msg.ShowAsync(); } }
public async void CreateAndSaveNote() { if (!string.IsNullOrEmpty(_noteVm.Note1) && _noteVm.SelectedStationItem.StationName != null) { DateTime convertedDate = _dateConverter.ConvertToDate(_noteVm.DueDate); int convertedStationName = _noteVm.SelectedStationItem.StationId; _noteObj = new Notes(_noteVm.NotesId, _noteVm.Note1, convertedDate, convertedStationName, _noteVm.UserId); await _savedNote.Save(_noteObj, "Notes"); FrameNavigateClass _frame = new FrameNavigateClass(); _frame.ActivateFrameNavigation(typeof(MenuPage)); MessageDialog msg = new MessageDialog("You just created a note!"); await msg.ShowAsync(); } else { var msg = new MessageDialog("Please fill in the information"); await msg.ShowAsync(); } }
public DeleteTaskHandler(TaskVm deleteVm) { _deleteVm = deleteVm; _frame = new FrameNavigateClass(); }