示例#1
0
        private void grdMenu_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int rowIndex = ((GridViewRow)((Control)e.CommandSource).NamingContainer).RowIndex;
            int menuId   = (int)this.grdMenu.DataKeys[rowIndex].Value;

            if (e.CommandName == "Fall")
            {
                VShopHelper.SwapMenuSequence(menuId, false);
            }
            else if (e.CommandName == "Rise")
            {
                VShopHelper.SwapMenuSequence(menuId, true);
            }
            else if (e.CommandName == "DeleteMenu")
            {
                if (VShopHelper.DeleteMenu(menuId))
                {
                    this.ShowMsg("成功删除了指定的分类", true);
                }
                else
                {
                    this.ShowMsg("分类删除失败,未知错误", false);
                }
            }
            this.BindData();
        }
示例#2
0
        private void Delete(HttpContext context)
        {
            int value = base.GetIntParam(context, "ids", false).Value;

            if (VShopHelper.DeleteMenu(value))
            {
                base.ReturnSuccessResult(context, "成功删除了指定的分类!", 0, true);
                return;
            }
            throw new HidistroAshxException("删除失败!");
        }
示例#3
0
        public void delmenu(System.Web.HttpContext context)
        {
            context.Response.ContentType = "application/json";
            string s      = "{\"status\":\"1\"}";
            int    menuId = 0;

            if (!int.TryParse(context.Request["MenuId"], out menuId))
            {
                return;
            }
            if (VShopHelper.DeleteMenu(menuId))
            {
                s = "{\"status\":\"0\"}";
            }
            context.Response.Write(s);
        }
示例#4
0
        public void delmenu(HttpContext context)
        {
            context.Response.ContentType = "application/json";
            string s      = "{\"status\":\"1\"}";
            int    result = 0;

            if (!int.TryParse(context.Request["MenuId"], out result))
            {
                s = "{\"status\":\"1\"}";
            }
            else
            {
                if (VShopHelper.DeleteMenu(result))
                {
                    s = "{\"status\":\"0\"}";
                }
                context.Response.Write(s);
            }
        }
示例#5
0
        public void Delete(HttpContext context)
        {
            int?intParam = base.GetIntParam(context, "id", false);

            if (!intParam.HasValue)
            {
                throw new HidistroAshxException("错误的编号");
            }
            if (base.CurrentSiteSetting.IsDemoSite)
            {
                throw new HidistroAshxException("演示站点不允许删除微信自定义菜单");
            }
            if (VShopHelper.DeleteMenu(intParam.Value))
            {
                base.ReturnSuccessResult(context, "成功删除了指定的菜单", 0, true);
                return;
            }
            throw new HidistroAshxException("删除失败!");
        }