public void GetItem() { string _id = Parameters["pid"]; OEContentClass item = new OEContentClass(); OEContentClassBiz biz = new OEContentClassBiz(); item = biz.Select(_id); if (item == null) { Response.Write(""); } else { Response.Write(item.ToJson()); } }
public void GetNowParent() { string _id = Parameters["pid"]; OEContentClass item = new OEContentClass(); OEContentClassBiz biz = new OEContentClassBiz(); item = biz.Select(_id); Response.Write(item.FParentId.ToString()); }
public void GetGridData() { string _searchcontent = ""; string _sortname = ""; string _sortdirection = ""; string _pagenumber = ""; string _pagesize = ""; _searchcontent = Parameters["psearchcontent"]; _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<OEContentClass> lists = new List<OEContentClass>(); OEContentClassBiz biz = new OEContentClassBiz(); string _searchtext = _searchcontent; string wheresql = ""; string _parentid = Parameters["pparentid"]; wheresql = "(FParentId = " + _parentid + ")"; if (!string.IsNullOrEmpty(_searchtext)) { //difine wheresql //for example:wheresql = " (FDepartmentName like '%" + _searchtext + "%') or (FDepartmentCode like '%" + _searchtext + "%')"; wheresql += " and (FContentClassName like '%" + _searchcontent + "%')"; } else { wheresql += " and (1=1)"; } 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 List<OEContentClassTree> Select() { OEContentClassBiz biz = new OEContentClassBiz(); return Select(0,biz.Select()); }