Example #1
0
        public ActionResult DesignDetailsPartial([ModelBinder(typeof(DesignCustomBinder))] DesignMaster itemdesign, HttpPostedFileBase file)
        {
            MainApplication model = new MainApplication();

            if (file != null)
            {
                var fileName = Path.GetFileName(file.FileName);
                var path     = ConfigurationManager.AppSettings["DesignPhotos"].ToString() + "/" + fileName;
                file.SaveAs(path);
                itemdesign.DesignPhoto = fileName;
            }
            itemdesign.CategoryCode = _ItemCategoryService.GetCodeByName(itemdesign.CategoryCode);
            _DesignService.CreateDesign(itemdesign);
            var DesignId = Encode(itemdesign.DesignId.ToString());

            return(RedirectToAction("CreateDetails/" + DesignId, "Design"));
        }