示例#1
0
 public NotesPage(App_WorkTicket workTicket, App_ScheduledAppointment scheduledAppointment)
 {
     _vm = new NotesPageViewModel(workTicket);
     appScheduledAppt = scheduledAppointment;
     InitializeComponent();
     Initialize();
 }
示例#2
0
 public static void NavigateToNotesPage()
 {
     if (NotesViewModel == null)
     {
         NotesViewModel = new NotesPageViewModel(new NotesPage());
     }
     NotesViewModel.UpdateNotes();
     NavService.Navigate(NotesViewModel.Page);
 }
示例#3
0
        public ActionResult ShowAll()
        {
            NotesPageViewModel noteViewModel = new NotesPageViewModel();

            using (var ctx = new ApplicationDbContext())
            {
                noteViewModel.AllNotes = ctx.Notes.ToList();
            }

            return(View("AllNotesPage", noteViewModel));
        }
示例#4
0
        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"));
        }
示例#5
0
 public NotesPage()
 {
     InitializeComponent();
     BindingContext          = new NotesPageViewModel();
     NotesList.ItemSelected += NotesPage_ItemSelected;
 }
示例#6
0
 public NotesPage()
 {
     _vm = new NotesPageViewModel();
     Initialize();
 }
示例#7
0
 public NotesPage(App_WorkTicket workTicket)
 {
     _vm = new NotesPageViewModel(workTicket);
     Initialize();
 }
示例#8
0
        public NotesPage()
        {
            InitializeComponent();

            BindingContext = _viewModel = new NotesPageViewModel();
        }