using BizCom; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SiteCore.Handler { public partial class sync { public void get_runinfo() { DataStruct dStruct = GetStruct(); List lw = new List(); string key = GetPostString("key"); if (key.Length > 0) lw.Add(string.Format("title like '%{0}%'", key)); dStruct.Order = "id desc"; dStruct.MainWhere = string.Join(" and ", lw.ToArray()); DataTable dt = WebCache.GetData("view_runinfo", dStruct); writeGridJson(dStruct.TotalCount, Utils.Serialization.JsonString.DataTable2MiniAjaxJson(dt)); } public void del_runinfo() { if (UrlParmsCheck("eid")) { int eid = GetInt("eid"); SRunInfo.Del(eid); returnSuccessMsg("删除成功"); } } public void save_runinfo() { if (UrlPostParmsCheck("type,con")) { int eid = GetPostInt("eid"); string name = GetPostString("name"); int type = GetPostInt("type"); string con = GetPostString("con"); con = con.Replace("\n", "
"); SRunInfo entity = null; if (eid > 0) entity = SRunInfo.Get(eid); else entity = new SRunInfo(); entity.Title = name; entity.Con = con; entity.TypeID = type; entity.UpdTime = DateTime.Now; if (eid > 0) entity.Update(); else entity.Create(); returnSuccessMsg("保存成功!"); } } } }