Beispiel #1
0
        private void btnSaveImageDataName_Click(object sender, System.EventArgs e)
        {
            string text = this.ReImageDataName.Text;

            if (!string.IsNullOrEmpty(text) && text.Length <= 30)
            {
                int photoId = System.Convert.ToInt32(this.ReImageDataNameId.Value);
                GalleryHelper.RenamePhoto(photoId, text);
                this.BindImageData();
                return;
            }
            this.ShowMsg("图片名称不能为空长度限制在30个字符以内!", false);
        }
Beispiel #2
0
        private void btnSaveImageDataName_Click(object sender, EventArgs e)
        {
            string text = this.ReImageDataName.Text;

            if (string.IsNullOrEmpty(text) || (text.Length > 30))
            {
                this.ShowMsg("图片名称不能为空长度限制在30个字符以内!", false);
            }
            else
            {
                GalleryHelper.RenamePhoto(Convert.ToInt32(this.ReImageDataNameId.Value), text);
                this.BindImageData();
            }
        }
Beispiel #3
0
        private void ReplaceName(HttpContext context)
        {
            string value = context.Request["PhotoId"];
            string text  = context.Request["PhotoName"];

            if (string.IsNullOrEmpty(text) || text.Length > 30)
            {
                throw new HidistroAshxException("图片名称不能为空长度限制在30个字符以内!");
            }
            int photoId = Convert.ToInt32(value);

            GalleryHelper.RenamePhoto(photoId, text);
            base.ReturnResult(context, true, "改名成功!", 0, true);
        }
 public string ReName(HttpContext context)
 {
     GalleryHelper.RenamePhoto(Convert.ToInt32(context.Request.Form["file_id"]), context.Request.Form["file_name"]);
     return("{\"status\": 1,\"msg\":\"\"}");
 }