Пример #1
0
        //启用-禁用流程
        public JsonResult ToggleProc(int id)
        {
            string result = new ProcessSv().ToggleProc(id);

            if (!string.IsNullOrEmpty(result))
            {
                return(Json(new ResultModel()
                {
                    suc = false, msg = result
                }));
            }
            return(Json(new ResultModel()
            {
                suc = true
            }));
        }
Пример #2
0
        public JsonResult RemoveAuditorRelation(int id)
        {
            string result = new ProcessSv().RemoveStepAuditor(id);

            if (!string.IsNullOrEmpty(result))
            {
                return(Json(new ResultModel()
                {
                    suc = false, msg = result
                }));
            }

            return(Json(new ResultModel()
            {
                suc = true, msg = "删除成功"
            }));
        }
Пример #3
0
        public JsonResult UpdateAuditorRelation(int id, FormCollection fcl)
        {
            MStepAuditor sa = new MStepAuditor();

            SomeUtils.SetFieldValueToModel(fcl, sa);

            string result = new ProcessSv().SaveStepAuditor(sa, id);

            if (!string.IsNullOrEmpty(result))
            {
                return(Json(new ResultModel()
                {
                    suc = false, msg = result
                }));
            }

            return(Json(new ResultModel()
            {
                suc = true, msg = "保存成功"
            }, "text/html"));
        }
Пример #4
0
        //保存流程的修改
        public JsonResult SaveProcess(FormCollection col)
        {
            Process pro = new Process();

            SomeUtils.SetFieldValueToModel(col, pro);
            pro.ProcessDetail.AddRange(JsonConvert.DeserializeObject <List <ProcessDetail> >(col.Get("proDetails")));

            string result = new ProcessSv().SaveProcess(pro);

            if (!string.IsNullOrEmpty(result))
            {
                return(Json(new ResultModel()
                {
                    suc = false, msg = result
                }));
            }

            return(Json(new ResultModel()
            {
                suc = true
            }));
        }