| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- 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_newslist()
- {
- DataStruct dStruct = GetStruct();
- //dStruct.MainWhere = "state=3";
- //(datediff(d,isnull(dispatchtime,createtime),'" + dTime + "')=0 or
- //string eTime = GetPostString("eTime");
- IList<string> lw = new List<string>();
- //SetDateWhere("deliverytime", sTime, eTime, lw);
- string key = GetPostString("key");
- if (key.Length > 0)
- lw.Add(string.Format(" (title like '%{0}%')", key));
- if (lw.Count > 0) dStruct.SecondWhere = string.Join(" and ", lw.ToArray());
- dStruct.Order = "sort asc,addTime desc";
- //dStruct.Fileds = "*,(select count(0) from s_shopgoods where shopid=view_shop.id) as gnum";
- DataTable dt = WebCache.GetData("view_news", dStruct);
- writeGridJson(dStruct.TotalCount, Utils.Serialization.JsonString.DataTable2MiniAjaxJson(dt));
- }
- public void del_news()
- {
- if (UrlParmsCheck("nid"))
- {
- int nid = GetInt("nid");
- SNews.Del(nid);
- returnSuccessMsg("删除成功!");
- }
- }
- }
- }
|