public void GetListName(string _id, ref string _titlename)
 {
     PortalProductList item = new PortalProductList();
     item = Select(_id);
     if (string.IsNullOrEmpty(_titlename))
     {
         _titlename = item.FProductListName + _titlename;
     }
     else
     {
         _titlename = item.FProductListName + " > " + _titlename;
     }
     if (item.FParentListId != 0)
     {
         GetListName(item.FParentListId.ToString(), ref _titlename);
     }
 }
 public Int64 Insert(PortalProductList item,out ErrorEntity ErrInfo)
 {
     if(string.IsNullOrEmpty(item.FProductListName))
     {
         ErrInfo = new ErrorEntity(RespCode.Pp01001);
         return -1;
     }
     if (!ChkNameExist(item.FProductListID.ToString(), item.FProductListName))
     {
         ErrInfo = new ErrorEntity(RespCode.Pp01002);
         return -1;
     }
     NameValueCollection parameters = new NameValueCollection();
     parameters.Add("FProductListName",item.FProductListName);
     if(item.FParentListId > 0)
     {
         parameters.Add("FParentListId",item.FParentListId.ToString());
     }
     parameters.Add("FProductListOrder",item.FProductListOrder.ToString());
     return Insert(parameters,out ErrInfo);
 }
示例#3
0
 public void SaveItem()
 {
     string _id = Parameters["plistid"];
     string _name = Parameters["plistname"];
     string _parentid = Parameters["pparentid"];
     string _order = Parameters["porder"];
     PortalProductList item = new PortalProductList();
     item.FProductListID = Convert.ToInt64(_id);
     item.FProductListName = _name;
     item.FProductListOrder = Convert.ToInt32(_order);
     item.FParentListId = Convert.ToInt64(_parentid);
     PortalProductListBiz biz = new PortalProductListBiz();
     ErrorEntity ErrInfo = new ErrorEntity();
     if (item.FProductListID == 0)
     {
         biz.Insert(item, out ErrInfo);
     }
     else
     {
         biz.Update(item, out ErrInfo);
     }
     Response.Write(ErrInfo.ToJson());
 }
示例#4
0
 public void GetListItem()
 {
     string id = Parameters["pid"];
     PortalProductListBiz biz = new PortalProductListBiz();
     PortalProductList item = new PortalProductList();
     item = biz.Select(id);
     Response.Write(item.ToJson());
 }
示例#5
0
 public void GetParentId()
 {
     string id = Parameters["pchildid"];
     PortalProductListBiz biz = new PortalProductListBiz();
     PortalProductList item = new PortalProductList();
     item = biz.Select(id);
     if (item == null)
     {
         Response.Write("0");
     }
     else
     {
         if (string.IsNullOrEmpty(item.FParentListId.ToString()))
         {
             Response.Write("0");
         }
         else
         {
             Response.Write(item.FParentListId.ToString());
         }
     }
 }