Esempio n. 1
0
        public ActionResult ContactEnrollmentForm(ContactForm contact)
        {
            HomeService  homeService = new HomeService();
            UserEntities db          = new UserEntities();

            List <BacklogFormDataDTO> dynamicFeildsvalue = new JavaScriptSerializer().Deserialize <List <BacklogFormDataDTO> >(contact.DynamicFieldsData);
            var firstname = dynamicFeildsvalue.Where(x => x.ColumnName == ((int)BacklogFormAttributesEnums.ContactColumn.Name).ToString()).FirstOrDefault();

            if (firstname != null)
            {
                var contactid = homeService.AddcontactId(firstname, contact.ContactId);
                foreach (var item in dynamicFeildsvalue)
                {
                    homeService.AddDynamicFieldData(item, contactid);
                }
            }

            return(RedirectToAction("Index"));
        }