Esempio n. 1
0
        public ActionResult Edit(int projectId, int id)
        {
            try {
                if (User.Identity.IsAuthenticated)
                {
                    ITaskLogic logic     = container.Resolve <ITaskLogic>();
                    var        viewmodel = new TaskViewModel(logic.HandleTaskGet(projectId, id));

                    return(Json(viewmodel, JsonRequestBehavior.AllowGet));
                }
                return(Json(new JsonDataHandler(httpCode: HttpCodeEnum.Forbidden).getWarning(), JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                return(Json(new JsonDataHandler(ex).getError(), JsonRequestBehavior.AllowGet));
            }
        }