Esempio n. 1
0
        public ActionResult Add(int?id)
        {
            ResponseStatus resp = ResponseStatus.NONE;

            if (Request.Form != null && Request.Form.Count > 0)
            {
                resp = workService.AddWork(Request);
                return(this.JudgeResult(resp, () => RedirectToAction("Details",
                                                                     new { id = Convert.ToInt32(Request.Form["activityId"]), msg = string.Format("添加了工作:{0}", Request.Form["content"].ToString()) })));
            }
            conta_Uwork            = new Container_UWork();
            conta_Uwork.activityId = (int)id;
            conta_Uwork.hash_work  = GLB.hash_work;
            resp = workService.WorkPrepare(Request, conta_Uwork);
            return(this.JudgeResult(resp, () => View(conta_Uwork)));
        }