Example #1
0
        public ActionResult Edit(Company company, HttpPostedFileBase file)
        {
            BusinessLogicHandler myHandler = new BusinessLogicHandler();

            if(ModelState.IsValid)
            {
                if (file != null)
                {
                    company.CompanyLogo = file.FileName;
                    file.SaveAs(HttpContext.Server.MapPath("~/Content/Images/") + file.FileName);
                }
                myHandler.UpdateCompany(company);
            }
            return RedirectToAction("CompanyDetails", "Company", null);
        }