public NotesPage(App_WorkTicket workTicket, App_ScheduledAppointment scheduledAppointment) { _vm = new NotesPageViewModel(workTicket); appScheduledAppt = scheduledAppointment; InitializeComponent(); Initialize(); }
public static void NavigateToNotesPage() { if (NotesViewModel == null) { NotesViewModel = new NotesPageViewModel(new NotesPage()); } NotesViewModel.UpdateNotes(); NavService.Navigate(NotesViewModel.Page); }
public ActionResult ShowAll() { NotesPageViewModel noteViewModel = new NotesPageViewModel(); using (var ctx = new ApplicationDbContext()) { noteViewModel.AllNotes = ctx.Notes.ToList(); } return(View("AllNotesPage", noteViewModel)); }
public ActionResult AddNew(NotesPageViewModel noteViewModel) { if (ModelState.IsValid == false) { return(View("NotatkiPage")); } using (var ctx = new ApplicationDbContext()) { ctx.Notes.Add(noteViewModel.NoteModel); ctx.SaveChanges(); } return(RedirectToAction("ShowAll")); }
public NotesPage() { InitializeComponent(); BindingContext = new NotesPageViewModel(); NotesList.ItemSelected += NotesPage_ItemSelected; }
public NotesPage() { _vm = new NotesPageViewModel(); Initialize(); }
public NotesPage(App_WorkTicket workTicket) { _vm = new NotesPageViewModel(workTicket); Initialize(); }
public NotesPage() { InitializeComponent(); BindingContext = _viewModel = new NotesPageViewModel(); }