public void SaveProduct()
 {
     string _productname = Parameters["pproductname"];
     string _productlist = Parameters["pproductlist"];
     string _productmodule = Parameters["pproductmodule"];
     string _productdesc = Parameters["pproductdesc"];
     string _briefpath = Parameters["pbriefpath"];
     string _path = Parameters["ppath"];
     string _briefcontent = Parameters["pbriefcontent"];
     string _content = Parameters["pcontent"];
     string _seotitle = Parameters["pseotitle"];
     string _seokeyword = Parameters["pseokeyword"];
     string _seodesc = Parameters["pseodesc"];
     PortalProduct item = new PortalProduct();
     item.FProductId = 0;
     item.FProductListID = Convert.ToInt64(_productlist);
     item.FProductName = _productname;
     item.FProductModule = _productmodule;
     item.FProductDesc = _productdesc;
     item.FProductPic = _path;
     item.FBriefPic = _briefpath;
     item.FSEOTitle = _seotitle;
     item.FSEOKeyWord = _seokeyword;
     item.FSEODesc = _seodesc;
     item.FProductBrief = _briefcontent;
     item.FProductContent = _content;
     PortalProductBiz biz = new PortalProductBiz();
     ErrorEntity ErrInfo = new ErrorEntity();
     biz.Insert(item, out ErrInfo);
     Response.Write(ErrInfo.ToJson());
 }
 public void DelProduct()
 {
     string _parm = Parameters["pparm"];
     PortalProductBiz biz = new PortalProductBiz();
     ErrorEntity ErrInfo = new ErrorEntity();
     biz.Delete(_parm, 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<PortalProduct> lists = new List<PortalProduct>();
     PortalProductBiz biz = new PortalProductBiz();
     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);
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     string _id = Parameters["id"];
     PortalProduct item = new PortalProduct();
     PortalProductBiz biz = new PortalProductBiz();
     item = biz.Select(_id);
     if (item != null)
     {
         gsproductname = item.FProductName;
         gsproductlistid = item.FProductListID.ToString();
         gsproductmodule = item.FProductModule;
         gsproductdesc = item.FProductDesc;
         gsbriefpic = item.FBriefPic;
         gspic = item.FProductPic;
         gsbriefcontent = item.FProductBrief;
         gscontent = item.FProductContent;
         gsseotitle = item.FSEOTitle;
         gsseokeyword = item.FSEOKeyWord;
         gsseodesc = item.FSEODesc;
     }
 }