Ejemplo n.º 1
0
        public JsonResult AddFlowEdit(Models.a_flowchart a_Flowchart)
        {
            //int flowid, string flowchart_version, string note,string flowchart_id
            if (a_Flowchart.id > 0)
            {
                chartHelper.Update(a_Flowchart);
            }
            int m = chartHelper.SaveChanges();

            return(Json(new {
                success = true,
                count = m,
                data = a_Flowchart
            }, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        public JsonResult AddFlow(Models.a_flowchart a_Flowchart)
        {
            if (a_Flowchart != null && a_Flowchart.id > 0)
            {
                chartHelper.Update(a_Flowchart);
            }
            else
            {
                a_Flowchart.flowchart_id = Guid.NewGuid().ToString().ToUpper();
                chartHelper.Insert(a_Flowchart);
            }
            int m = chartHelper.SaveChanges();

            //return Json(m, JsonRequestBehavior.AllowGet);
            return(Json(new
            {
                success = true,
                count = m,
                data = a_Flowchart
            }, JsonRequestBehavior.AllowGet));
        }