protected void gvList_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int suiteId = Convert.ToInt32(e.CommandArgument);
            NoName.NetShop.Solution.BLL.SuiteBll sbll = new NoName.NetShop.Solution.BLL.SuiteBll();

            if (e.CommandName == "del")
            {
                sbll.Delete(suiteId);
                this.BindList();
            }
        }
示例#2
0
        protected void gvList_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int suiteId = Convert.ToInt32(e.CommandArgument);

            NoName.NetShop.Solution.BLL.SuiteBll sbll = new NoName.NetShop.Solution.BLL.SuiteBll();

            if (e.CommandName == "del")
            {
                sbll.Delete(suiteId);
                this.BindList();
            }
        }
        private string AddFavorite(HttpContext context)
        {
            NameValueCollection nv = GetParas(context);
            bool   result          = false;
            string code            = "";
            string message         = "";

            if (context.User.Identity.IsAuthenticated && ((ShopIdentity)context.User.Identity) != null)
            {
                FavoriteBll   fbll     = new FavoriteBll();
                FavoriteModel favModel = new FavoriteModel();

                favModel.ContentId   = int.Parse(nv["cid"]);
                favModel.UserId      = ((ShopIdentity)context.User.Identity).UserId;
                favModel.ContentType = (ContentType)int.Parse(nv["ctype"]);

                switch (favModel.ContentType)
                {
                case ContentType.Product:
                    NoName.NetShop.Product.BLL.ProductModelBll pbll   = new NoName.NetShop.Product.BLL.ProductModelBll();
                    NoName.NetShop.Product.Model.ProductModel  pmodel = pbll.GetModel(favModel.ContentId);
                    favModel.FavoriteName = pmodel.ProductName;
                    favModel.FavoriteUrl  = pmodel.ProductUrl;
                    break;

                case ContentType.Solution:
                    NoName.NetShop.Solution.BLL.SuiteBll     sbll   = new NoName.NetShop.Solution.BLL.SuiteBll();
                    NoName.NetShop.Solution.Model.SuiteModel smodel = sbll.GetModel(favModel.ContentId);
                    favModel.FavoriteName = smodel.SuiteName;
                    favModel.FavoriteUrl  = ConfigurationManager.AppSettings["siteurl"] + "/solution/suitedetail.aspx?suite=" + smodel.SuiteId;
                    break;
                }
                fbll.Add(favModel);
                result  = true;
                message = "收藏成功";
            }
            else
            {
                result  = false;
                message = "您还没有登录,请先登录!";
            }
            return(GetJsonResult(result, code, message));
        }
示例#4
0
 private void BindList()
 {
     NoName.NetShop.Solution.BLL.SuiteBll sbll = new NoName.NetShop.Solution.BLL.SuiteBll();
     gvList.DataSource = sbll.GetListArray(ScenceId);
     gvList.DataBind();
 }
 private void BindList()
 {
     NoName.NetShop.Solution.BLL.SuiteBll sbll = new NoName.NetShop.Solution.BLL.SuiteBll();
     gvList.DataSource = sbll.GetListArray(ScenceId);
     gvList.DataBind();
 }