public ActionResult NewDream(Dream model) { try { bool result = IBOVirtualAPI.Create <Dream>(model); } catch { } return(RedirectToAction("Index")); }
public ActionResult NewGoal(Goal model) { try { bool result = IBOVirtualAPI.Create <Goal>(model); } catch { } return(RedirectToAction("Index")); }
public ActionResult MoreDreams(int id) { try { Dream dream = IBOVirtualAPI.Get <Dream>(id.ToString()); if (dream != null) { Dream newDream = ModelParser.ParseDream(dream); bool result = IBOVirtualAPI.Create <Dream>(newDream); } } catch { } return(RedirectToAction("Index")); }
public ActionResult MoreGoals(int id) { try { Goal goal = IBOVirtualAPI.Get <Goal>(id.ToString()); if (goal != null) { Goal newGoal = ModelParser.ParseGoal(goal); bool result = IBOVirtualAPI.Create <Goal>(newGoal); } } catch { } return(RedirectToAction("Index")); }
public ActionResult CreateBookAjax(Book model) { if (ModelState.IsValid == true) { bool result = IBOVirtualAPI.Create <Book>(model); if (result) { return(Json(model)); } else { return(Json(new { success = false })); } } else { return(Json(new { success = false })); } }
public ActionResult NewContactAjax(Contact model) { if (ModelState.IsValid == true) { bool result = IBOVirtualAPI.Create <Contact>(model); if (result) { return(Json(model)); } else { return(Json(new { success = false, message = "The contact already exists." })); } } else { return(Json(new { success = false, message = "Please correct all the issues." })); } }
public ActionResult NewFollowupAjax(ContactFollowup model) { if (ModelState.IsValid == true && (model.contactId != 0)) { bool result = IBOVirtualAPI.Create <ContactFollowup>(model); if (result) { return(Json(new { success = true })); } else { return(Json(new { success = false, message = "There Was an issue saving the Followup, please try again. " })); } } else { return(Json(new { success = false, message = "Selecting a Contact is required" })); } }
public ActionResult AddIBO(IBO model) { ViewBag.languages = languages; IBO ibo = ModelParser.ParseIBO(model); ibo.UserId = WebSecurity.CurrentUserId; ibo.datetime = DateTime.Now; ibo.facebookid = FacebookId != null ? FacebookId : ""; ibo.accesstoken = AccessToken != null ? AccessToken : ""; ibo.level = model.level; try { bool result = IBOVirtualAPI.Create <IBO>(ibo); Cookies.iboCookie.Nullify(); return(RedirectToAction("Index", "Dashboard")); } catch { ModelState.AddModelError(null, "The IBO Number is already been used"); return(View(model)); } }
public ActionResult CreateBook(Book model) { bool result = IBOVirtualAPI.Create <Book>(model); return(RedirectToAction("Index")); }
public ActionResult CreateAlert(Alert model) { bool result = IBOVirtualAPI.Create <Alert>(model); return(RedirectToAction("Index")); // This Sends you back to the index after saving }