InFolderSetting() публичный Метод

public InFolderSetting ( string FolderID ) : int?
FolderID string
Результат int?
Пример #1
0
        public ActionResult UpdateImage(FormCollection form, string saveImage, string cancelImage)
        {
            EditImage ei = new EditImage();
            Tools tool = new Tools();

            int index = Convert.ToInt32(form["FileID"]);
            var files = from f in dbContext.Files where f.FileID == index select f;
            var file = files.First();

            file.Description = form["Description"];
            if (form["FolderID"] == "")
            ViewBag.FolderID = new SelectList(dbContext.Folders, "FolderID", "FolderName", file.FolderID);

            if (saveImage != null)
            {
                file.Tags = ei.stringOfTags(form);
                file.FolderID = ei.InFolderSetting(form["FolderID"]);

                if (ModelState.IsValid)
                {
                    dbContext.Entry(file).State = EntityState.Modified;
                    dbContext.SaveChanges();
                    return RedirectToAction("./../Image/DisplayImage", new { filename = form["Filename"] });
                }
                return View(file);
            }
            else
            {
                return RedirectToAction("./../Image/DisplayImage", new { filename = form["Filename"] });
            }
        }