コード例 #1
0
        public ActionResult ContactEntries(ContactEntriesModel contactEntriesModel)
        {
            ViewBag.contactEntriesModel = contactEntriesModel;

            if (ModelState.IsValid)
            {
                var contactEntries = Services.ContentService.Create("contactoteste", 1255, "contactEntries");
                contactEntries.SetValue("fullName", contactEntriesModel.FullName);
                contactEntries.SetValue("email", contactEntriesModel.Email);
                contactEntries.SetValue("phoneNumber", contactEntriesModel.PhoneNumber);
                contactEntries.SetValue("budgetLevel", contactEntriesModel.Budget);
                contactEntries.SetValue("requirements", contactEntriesModel.Requirements);

                Services.ContentService.Save(contactEntries);
            }

            return(RedirectToCurrentUmbracoPage());
        }
コード例 #2
0
 public ActionResult ContactEntries(ContactEntriesModel contactEntriesModel)
 {
     return(CurrentTemplate(contactEntriesModel));
 }