public IActionResult Delete(int id, [FromQuery] int dayId) { ServiceResult result = PeriodService.DeletePeriod(id); if (result.Result == Result.NotFound) { return(NotFound()); } bool dayApproved = SchoolDayService.IsDayApproved(dayId); return(Ok(new { dayApproved })); }
public async Task <ActionResult> DeleteConfirmed(Guid id) { await periodService.DeletePeriod(id); return(RedirectToAction("Index")); }