public bool addSupervice(Supervice supervice) { try { _superviceRepository.Add(supervice); return(true); } catch { return(false); } }
public ActionResult checkIfSupervice(long planId) { Supervice supervice = _superviceService.getSuperviceByPlanidUserid(planId, loginUser.userId); if (supervice == null) { JsonResult["boo_success"] = true; return(Json(JsonResult)); } else { JsonResult["boo_success"] = false; return(Json(JsonResult)); } }
public ActionResult supervice(long planId) { Supervice supervice = new Supervice(); supervice.planId = planId; supervice.userId = loginUser.userId; supervice.superviceTime = DateTime.Now; if (_superviceService.addSupervice(supervice)) { JsonResult["boo_success"] = true; return(Json(JsonResult)); } else { JsonResult["boo_success"] = false; return(Json(JsonResult)); } }