Beispiel #1
0
 public void GetColumnItem()
 {
     string id = Parameters["pid"];
     PortalColumnBiz biz = new PortalColumnBiz();
     PortalColumn item = new PortalColumn();
     item = biz.Select(id);
     Response.Write(item.ToJson());
 }
Beispiel #2
0
 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<PortalColumn> lists = new List<PortalColumn>();
     PortalColumnBiz biz = new PortalColumnBiz();
     string _searchtext = _searchcontent;
     string _parentid = Parameters["pparentid"];
     string wheresql = "";
     if (string.IsNullOrEmpty(_parentid) || _parentid == "0")
     {
         wheresql = "(FParentColumnId is null)";
     }
     else
     {
         wheresql = "(FParentColumnId = " + _parentid + ")";
     }
     if (!string.IsNullOrEmpty(_searchtext))
     {
         wheresql += " and (FRoleName like '%" + _searchtext + "%')";
     }
     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);
 }
Beispiel #3
0
 public void GetParentId()
 {
     string id = Parameters["pchildid"];
     PortalColumnBiz biz = new PortalColumnBiz();
     PortalColumn item = new PortalColumn();
     item = biz.Select(id);
     if (item == null)
     {
         Response.Write("0");
     }
     else
     {
         if(string.IsNullOrEmpty(item.FParentColumnId.ToString()))
         {
             Response.Write("0");
         }
         else
         {
             Response.Write(item.FParentColumnId.ToString());
         }
     }
 }