private string submitaction(JsonArrayParse jp) { JsonObjectCollection collection = new JsonObjectCollection(); string flag = "1"; try { Business.Base.BusinessFlowNode bc = new project.Business.Base.BusinessFlowNode(); bc.load(jp.getValue("id"), user.Entity.AccID); bc.Entity.OpNo = jp.getValue("OpNo"); bc.Entity.OpName = jp.getValue("OpName"); int r = bc.Save("update"); if (r <= 0) { flag = "2"; } } catch { flag = "2"; } collection.Add(new JsonStringValue("type", "submit")); collection.Add(new JsonStringValue("flag", flag)); collection.Add(new JsonStringValue("liststr", createList())); return(collection.ToString()); }
private string updateaction(JsonArrayParse jp) { JsonObjectCollection collection = new JsonObjectCollection(); string flag = "1"; string result = "";; try { Business.Base.BusinessFlowNode bc = new project.Business.Base.BusinessFlowNode(); bc.load(jp.getValue("id"), user.Entity.AccID); collection.Add(new JsonStringValue("NodeNo", bc.Entity.NodeNo)); collection.Add(new JsonStringValue("NodeName", bc.Entity.NodeName)); collection.Add(new JsonStringValue("OpNo", bc.Entity.OpNo)); collection.Add(new JsonStringValue("OpName", bc.Entity.OpName)); } catch { flag = "2"; } collection.Add(new JsonStringValue("type", "update")); collection.Add(new JsonStringValue("flag", flag)); result = collection.ToString(); return(result); }