/// <see cref="AppointmentDAL.DeleteAppointment(Appointment)"/> public bool DeleteAppointment(Appointment appt) { if (appt == null) { throw new ArgumentNullException("Appointment cannot be null"); } return(AppointmentDAL.DeleteAppointment(appt)); }
public ActionResult PartialViewLookup(string ID, string DBOperation = "") { SharedViewModel vm = new SharedViewModel(); vm.Appointments = _appoDal.GetAllAppointments().TranslateAppointmentDEList(); if (!string.IsNullOrWhiteSpace(DBOperation)) { if (DBOperation == "DELETE") { int id = Convert.ToInt32(ID); if (_appoDal.DeleteAppointment(id)) { vm.Appointments = _appoDal.GetAllAppointments().TranslateAppointmentDEList(); } } } return(PartialView(vm)); }