示例#1
0
        public ActionResult _UpdateGalleryDitails(string folder)
        {
            string GalleryPath = Server.MapPath("~/Content/UserFiles/Users/" + folder + "/");
            List <ImageGalleryItem> allImages = SF.GalleryFile2List(GalleryPath, 120, 120, false, false);

            foreach (ImageGalleryItem item in allImages)
            {
                string order = Request["gallery_div_order_" + Url.Encode(item.FileName)];
                string title = Request["gallery_div_title_" + Url.Encode(item.FileName)];

                item.Title = title;

                if (!string.IsNullOrEmpty(order))
                {
                    int tempInt = 0;
                    int.TryParse(order, out tempInt);
                    if (tempInt != 0)
                    {
                        item.Order = tempInt;
                    }
                }
            }

            bool done = SF.GalleryList2File(allImages, GalleryPath);

            return(Content((done ? "בוצע" : "שגיאה")));
        }
示例#2
0
        public ActionResult _UpdateGalleryDitails(string folder)
        {
            string UserFolder = string.Format("~/Content/UserFiles/{0}/{1}", LS.CurrentUser.RoleDefault, folder);

            string GalleryPath = Server.MapPath(UserFolder);
            List <ImageGalleryItem> allImages = SF.GalleryFile2List(GalleryPath, 120, 120, false, false);

            foreach (ImageGalleryItem item in allImages)
            {
                string order = Request["gallery_div_order_" + Url.Encode(item.FileName)];
                string title = Request["gallery_div_title_" + Url.Encode(item.FileName)];

                item.Title = title;

                if (!string.IsNullOrEmpty(order))
                {
                    int tempInt = 0;
                    int.TryParse(order, out tempInt);
                    if (tempInt != 0)
                    {
                        item.Order = tempInt;
                    }
                }
            }

            bool done = SF.GalleryList2File(allImages, GalleryPath);

            return(Content((done ? "Done" : "Error")));
        }