Beispiel #1
0
        public JsonResult GetWorkFlowDef()
        {
            string id = QueryString("id");

            id.CheckNotNullOrEmpty("id");
            WFDef cForm = UnitOfWork.GetByKey <WFDef>(id);

            cForm.CheckNotNull("WFDef");
            return(Json(cForm));
        }
Beispiel #2
0
        public JsonResult Publish()
        {
            string bPublish = QueryString("bPublish");

            bPublish.CheckBoolType("bPublish");
            string id = QueryString("id");

            id.CheckNotNullOrEmpty("id");
            WFDef wfDef = UnitOfWork.GetByKey <WFDef>(id);

            wfDef.CheckNotNull("WFDef");
            wfDef.IsPublish = bPublish;
            if (wfDef.IsPublish == "true")
            {
                var defInst = wfDef.CreateInst();
                UnitOfWork.Add <WFDefInst>(defInst);
            }

            return(Json(UnitOfWork.Commit()));
        }