Пример #1
0
        public ActionResult EditOrder(int ID, News news, HttpPostedFileBase Image)
        {
            var    FileName = Path.GetFileName(Image.FileName);
            string path     = Path.Combine(Server.MapPath("~/Common/img"), FileName);

            Image.SaveAs(path);

            news.Image2 = FileName;

            dao.EditOrder(ID, news);
            ViewBag.ListNewsOrder = dao.ListNewsOrder();
            return(View(dao.ViewDetails(ID)));
        }