Esempio n. 1
0
        public IActionResult Edit(ProviderNoteViewModel selectedNoteToUpdate)
        {
            Provider updateNote = context.Providers.FirstOrDefault(u => u.ID == selectedNoteToUpdate.ID);

            updateNote.Name                  = selectedNoteToUpdate.Name;
            updateNote.SubscriberNumber      = selectedNoteToUpdate.SubscriberNumber;
            updateNote.PagesToSave           = selectedNoteToUpdate.PagesToSave;
            updateNote.SavedPagesDescription = selectedNoteToUpdate.SavedPagesDescription;
            updateNote.Address               = selectedNoteToUpdate.Address;
            updateNote.BenefitRenewal        = selectedNoteToUpdate.BenefitRenewal;
            updateNote.AuthNote              = selectedNoteToUpdate.AuthNote;
            updateNote.MiscNotes             = selectedNoteToUpdate.MiscNotes;
            context.Providers.Update(updateNote);

            return(RedirectToAction("Detail", updateNote.ID));
        }
Esempio n. 2
0
        public IActionResult Edit()
        {
            ProviderNoteViewModel selectedNoteToUpdate = new ProviderNoteViewModel();

            return(View(selectedNoteToUpdate));
        }