public PartialViewResult WebsiteAttributes(string partialName) { WebsiteAttribute websiteAttribute = _websiteAttributeService.GetAll().First(); WebsiteAttributeViewModel model = new WebsiteAttributeViewModel(); model.websiteAttribute = websiteAttribute; return(PartialView(partialName, model)); }
public JsonResult GetWebsiteAttributes() { WebsiteAttribute websiteAttribute = _websiteAttributeService.GetAll().First(); JsonResult result = new JsonResult(); result.Data = websiteAttribute; result.JsonRequestBehavior = JsonRequestBehavior.AllowGet; return(result); }
//=============Website Attributes=============// public ActionResult WebsiteAttributeInfo(string notify) { WebsiteAttribute websiteAttribute = _websiteAttributeService.GetAll().First(); WebsiteAttributeViewModel model = new WebsiteAttributeViewModel(); model.websiteAttribute = websiteAttribute; if (notify != null) { ViewBag.notify = "Successful"; } return(View(model)); }
public ActionResult Contact() { WebsiteAttributeViewModel model = new WebsiteAttributeViewModel(); WebsiteAttribute websiteAttribute = _websiteAttributeService.GetAll().First(); model.websiteAttribute = websiteAttribute; if (User.Identity.IsAuthenticated) { Account account = _accountService.GetByUserId(User.Identity.GetUserId()); model.websiteAttribute.email = account.Email; model.websiteAttribute.phone = account.PhoneNumber; model.websiteAttribute.name = account.UserName; } return(View(model)); }