/// <summary> /// /// </summary> /// <param name="scriptname"></param> /// <param name="category"></param> /// <param name="script"></param> /// <returns></returns> public JsonpResult SaveDataScript(string scriptname, string category, string script, string intend) { DataScript ds = new DataScript(scriptname, category, script); ds.AddIntend(intend); ds.Save(); //if (ds.ScriptID != "") { // ScriptIntend sc = new ScriptIntend(ds.ScriptID, intend); // sc.Save(); //} return(new JsonpResult(ds.ScriptID)); }
/// <summary> /// /// </summary> /// <param name="scriptname"></param> /// <param name="category"></param> /// <param name="script"></param> /// <param name="scriptid"></param> /// <returns></returns> public JsonpResult UpdateDataScript(string scriptname, string category, string script, string scriptid, string intend) { DataScript ds = new DataScript(scriptid); ds.Script = script; ds.Name = scriptname; ds.Category = category; ds.AddIntend(intend); ds.Save(); //ScriptIntend sc = new ScriptIntend(ds.ScriptID, intend); //sc.Update(); return(new JsonpResult(ds.ScriptID)); }