Esempio n. 1
0
        public ActionResult EditInit(string id)
        {
            if (string.IsNullOrWhiteSpace(id))
            {
                return(Json(null));
            }

            try
            {
                var jobId       = int.Parse(id);
                var checkResult = UserLogic.IsJobMaster(GetOperation().UserId, jobId);
                if (checkResult.IsSuccess == false)
                {
                    return(Json(checkResult));
                }

                var result = JobLogic.GetDetail(jobId);
                return(Json(result));
            }
            catch
            {
                var result = new IsSuccessResult(ErrorCode.JobNotFound.ToString());
                return(Json(result));
            }
        }
Esempio n. 2
0
 public ActionResult DetailInit(string id)
 {
     try
     {
         var jobId  = int.Parse(id);
         var result = JobLogic.GetDetail(jobId);
         return(Json(result));
     }
     catch
     {
         var result = new IsSuccessResult(ErrorCode.JobNotFound.ToString());
         return(Json(result));
     }
 }