Exemplo n.º 1
0
        public ActionResult UpdateEducation(string UpdateType, Models.Customer.CustomerEducation custEducation)
        {
            Models.Customer.CustomerEducationModel md = new CustomerEducationModel();
            Mapper.CreateMap <BusinessObjects.EducationType, Models.Customer.EducationType>();
            IEnumerable <Models.Customer.EducationType> EducationType = Mapper.Map <IEnumerable <BusinessObjects.EducationType>, IEnumerable <Models.Customer.EducationType> >(service.getEducationType());

            md.custEducation = custEducation;
            md.EducationType = EducationType;
            var pvr = new PartialViewResult();

            if (UpdateType == "update")
            {
                pvr = PartialView("_UpdateEducation", md);
            }
            else if (UpdateType == "add")
            {
                pvr = PartialView("_AddEducation", md);
            }
            return(pvr);
        }