public ActionResult Index2() { SemplestModel.Semplest dbContext = new SemplestModel.Semplest(); Credential cred = ((Credential)(Session[Semplest.SharedResources.SEMplestConstants.SESSION_USERID])); HomeModelChild child = new HomeModelChild(); IQueryable<Credential> cCred = dbContext.Credentials.Where(x => x.UsersFK == cred.UsersFK); ViewBag.Title = cCred.First().User.FirstName + " " + cCred.First().User.LastName + " - " + cCred.First().User.Customer.Name; child.ProductGroups = cCred.First().User.Customer.ProductGroups; return View(child); }
public ActionResult Index2() { SemplestModel.Semplest dbContext = new SemplestModel.Semplest(); Credential cred = ((Credential)(Session[Semplest.SharedResources.SEMplestConstants.SESSION_USERID])); HomeModelChild child = new HomeModelChild(); IQueryable<Credential> cCred = dbContext.Credentials.Where(x => x.UsersFK == cred.UsersFK); var ps = dbContext.GetCustomerPromotionStatus(cCred.Single().User.CustomerFK).OrderBy(q => q.PromotionStatus).ThenBy(q => q.PromotionName).ToList(); ViewBag.Title = cCred.First().User.FirstName + " " + cCred.First().User.LastName + " - " + cCred.First().User.Customer.Name; child.CustomerPromotions = ps; return View(child); }