コード例 #1
0
 public ActionResult Delete(Worklog worklog, int projectId, int taskId, int id)
 {
     try
     {
         if (User.Identity.IsAuthenticated)
         {
             IWorklogLogic logic = container.Resolve<IWorklogLogic>();
             logic.HandleWorklogDelete(projectId, taskId, id, User.Identity.Name);
             return Json(new JsonDataHandler(httpCode: HttpCodeEnum.OK, message: "Worklog successfully removed!").getInfo(), JsonRequestBehavior.AllowGet);
         }
         return Json(new JsonDataHandler(httpCode: HttpCodeEnum.Forbidden).getWarning(), JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         return Json(new JsonDataHandler(ex).getError(), JsonRequestBehavior.AllowGet);
     }
 }
コード例 #2
0
 public WorklogViewModel(Worklog worklog)
 {
     Worklog = worklog;
 }