Ejemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, RelatedParty patient)
        {
            if (id != patient.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(patient);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PatientExists(patient.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(patient));
        }
Ejemplo n.º 2
0
 public override void Dispose()
 {
     if (!base._isDisposed)
     {
         _value = null;
         GC.SuppressFinalize(this);
         base._isDisposed = !base._isDisposed;
     }
 }
Ejemplo n.º 3
0
        public async Task <IActionResult> Create(RelatedParty patient)
        {
            if (ModelState.IsValid)
            {
                _context.Add(patient);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(patient));
        }
Ejemplo n.º 4
0
        public IEntryBuilder AddSubjectOfInformation(RelatedParty subjectOfInformation)
        {
            _value.SubjectOfInformation = subjectOfInformation;

            return(this);
        }
Ejemplo n.º 5
0
        public IRelatedPartyBuilder Clear()
        {
            _value = base.ResetValue <RelatedParty>();

            return(this);
        }