Ejemplo n.º 1
0
        public IActionResult Put(AppointmentPutBM inputs)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            else
            {
                AppointmentLogic aptLogic = new AppointmentLogic(_unitOfWork);

                try
                {
                    if (aptLogic.Update(inputs.Id, inputs.PatientId, inputs.AppointmentTime, inputs.Notes) > 0)
                    {
                        return(Ok());
                    }
                    else
                    {
                        return(NotFound());
                    }
                }
                catch (Exception ex)
                {
                    return(BadRequest(ex));
                }
            }
        }
Ejemplo n.º 2
0
 public ActionResult EditPost(int id)
 {
     _appointment.Update(id, _appointment.GetById(id));
     return(View("Details", _appointment.GetById(id)));
 }