Beispiel #1
0
 public string DelFolder(HttpContext context)
 {
     if (GalleryHelper.DeletePhotoCategory(Convert.ToInt32(context.Request["id"])))
     {
         return("{\"status\":1,\"msg\":\"\"}");
     }
     return("{\"status\":0,\"msg\":\"请选择一个分类\"}");
 }
Beispiel #2
0
        protected void ImageTypeList_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e)
        {
            int categoryId = (int)this.ImageTypeList.DataKeys[e.RowIndex].Value;

            if (GalleryHelper.DeletePhotoCategory(categoryId))
            {
                this.ShowMsg("删除成功!", true);
                this.GetImageType();
                return;
            }
            this.ShowMsg("删除分类失败", false);
        }
Beispiel #3
0
        public string DelFolder(HttpContext context)
        {
            int    categoryId = Convert.ToInt32(context.Request["id"]);
            string a          = context.Request["type"];
            bool   deletePic  = !(a == "1") && true;

            if (GalleryHelper.DeletePhotoCategory(categoryId, deletePic))
            {
                return("{\"status\":1,\"msg\":\"\"}");
            }
            return("{\"status\":0,\"msg\":\"请选择一个分类\"}");
        }
Beispiel #4
0
        protected void ImageTypeList_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            int categoryId = (int)ImageTypeList.DataKeys[e.RowIndex].Value;

            if (GalleryHelper.DeletePhotoCategory(categoryId))
            {
                ShowMsg("删除成功!", true);
                GetImageType();
            }
            else
            {
                ShowMsg("删除分类失败", false);
            }
        }
Beispiel #5
0
        public void Delete(HttpContext context)
        {
            int value = base.GetIntParam(context, "id", false).Value;

            if (value < 1)
            {
                throw new HidistroAshxException("错误的参数");
            }
            if (GalleryHelper.DeletePhotoCategory(value, false))
            {
                base.ReturnSuccessResult(context, "删除成功", 0, true);
                return;
            }
            throw new HidistroAshxException("操作失败");
        }