public void DelArticle() { string _parm = Parameters["pparm"]; PortalArticleBiz biz = new PortalArticleBiz(); ErrorEntity ErrInfo = new ErrorEntity(); biz.Delete(_parm, out ErrInfo); Response.Write(ErrInfo.ToJson()); }
public void SaveContent() { string _arttitle = Parameters["parttitle"]; string _titlestyle = Parameters["ptitlestyle"]; string _author = Parameters["pauthor"]; string _comefrom = Parameters["pcomefrom"]; string _releasetime = Parameters["preleasetime"]; string _clicknum = Parameters["pclicknum"]; string _url = Parameters["purl"]; string _picflag = Parameters["ppicflag"]; string _picpath = Parameters["ppicpath"]; string _commentflag = Parameters["pcommentflag"]; string _seotitle = Parameters["pseotitle"]; string _seokeyword = Parameters["pseokeyword"]; string _seodesc = Parameters["pseodesc"]; string _briefcontent = Parameters["pbriefcontent"]; string _content = Parameters["pcontent"]; string _listid = Parameters["plistid"]; PortalArticleBiz biz = new PortalArticleBiz(); PortalArticle item = new PortalArticle(); item.FArticleAuthor = _author; item.FArticleClickNum = Convert.ToInt32(_clicknum); item.FArticleComeFrom = _comefrom; if (string.IsNullOrEmpty(_releasetime)) { item.FArticleTime = DateTime.Now; } else { item.FArticleTime = Convert.ToDateTime(_releasetime); } item.FArticlePic = _picpath; item.FArticlePicFlag = _picflag; item.FArticleStyle = _titlestyle; item.FArticleTitle = _arttitle; item.FArticleUrl = _url; item.FBriefContent = _briefcontent; item.FCommentFlag = _commentflag; item.FContent = _content; item.FSEODescription = _seodesc; item.FSEOKeyWord = _seokeyword; item.FSEOTitle = _seotitle; if (string.IsNullOrEmpty(_listid)) { } else { item.FListId = Convert.ToInt64(_listid); } ErrorEntity ErrInfo = new ErrorEntity(); biz.Insert(item, out ErrInfo); Response.Write(ErrInfo.ToJson()); }
public void GetGridData() { string _sortname = ""; string _sortdirection = ""; string _pagenumber = ""; string _pagesize = ""; _sortname = Parameters["psortname"]; if (!string.IsNullOrEmpty(_sortname)) { sSortName = _sortname; } _sortdirection = Parameters["psortdirection"]; if (!string.IsNullOrEmpty(_sortdirection)) { sSortDirection = _sortdirection; } _pagenumber = Parameters["ppagenumber"]; if (!string.IsNullOrEmpty(_pagenumber)) { sPageIndex = Convert.ToInt32(_pagenumber); } _pagesize = Parameters["ppagesize"]; if (!string.IsNullOrEmpty(_pagesize)) { sPageSize = Convert.ToInt32(_pagesize); } List<PortalArticle> lists = new List<PortalArticle>(); PortalArticleBiz biz = new PortalArticleBiz(); string listid = Parameters["plistid"]; string wheresql = ""; if (listid == "0" || string.IsNullOrEmpty(listid)) { wheresql = "1=1"; } else { //历遍下级listid Getwheresql(listid, ref wheresql); } NameValueCollection where = new NameValueCollection(); where.Add("condition", wheresql); NameValueCollection orderby = new NameValueCollection(); orderby.Add(_sortname, _sortdirection); Int32 totalcount = 0; lists = biz.Select(where, orderby, Convert.ToInt32(sPageIndex), Convert.ToInt32(sPageSize), out totalcount); string datasource = Utils.GetRepeaterDatasource(lists, sPageIndex, sPageSize, totalcount); Response.Write(datasource); }
public void UnRecommend() { string _id = Parameters["pid"]; PortalArticleBiz biz = new PortalArticleBiz(); ErrorEntity ErrInfo = new ErrorEntity(); biz.UpdateStatus(_id, "0", out ErrInfo); Response.Write(ErrInfo.ToJson()); }
protected void Page_Load(object sender, EventArgs e) { string FArtId = Parameters["id"]; sartid = FArtId; PortalArticle item = new PortalArticle(); PortalArticleBiz biz = new PortalArticleBiz(); item = biz.Select(FArtId); if (item != null) { sarttitle = item.FArticleTitle; if (item.FListId != 0) { sartlistid = item.FListId.ToString(); } spicpath = item.FArticlePic; sarticlecontent = item.FContent; sseotitle = item.FSEOTitle; sseokeyword = item.FSEOKeyWord; sseodesc = item.FSEODescription; stitlestyle = item.FArticleStyle; sauthor = item.FArticleAuthor; scomefrom = item.FArticleComeFrom; sreleasetime = item.FArticleTimeStr; sclicknum = item.FArticleClickNum.ToString(); surl = item.FArticleUrl; picflag = item.FArticlePicFlag; scommentflag = item.FCommentFlag; sbriefcontent = item.FBriefContent; } }