public ActionResult Index(ReportIndexModel model) { Credential cred = ((Credential)(Session[Semplest.SharedResources.SEMplestConstants.SESSION_USERID])); SemplestModel.Semplest dbContext = new SemplestModel.Semplest(); model.AdvertisingEngines = dbContext.AdvertisingEngines; model.ProductGroups = dbContext.Credentials.Where(x => x.UsersFK == cred.UsersFK).First().User.Customer.ProductGroups; return RedirectToAction("ReportDetails", model); }
public ActionResult Index(ReportIndexModel model) { var cred = ((Credential)(Session[SharedResources.SEMplestConstants.SESSION_USERID])); var dbContext = new SemplestModel.Semplest(); model.AdvertisingEngines = dbContext.AdvertisingEngines; var credential = dbContext.Credentials.FirstOrDefault(x => x.UsersFK == cred.UsersFK); if (credential != null) model.ProductGroups = credential.User.Customer.ProductGroups; return RedirectToAction("ReportDetails", model); }
public ActionResult ReportDetails(ReportIndexModel model) { Credential cred = ((Credential)(Session[Semplest.SharedResources.SEMplestConstants.SESSION_USERID])); SemplestModel.Semplest dbContext = new SemplestModel.Semplest(); model.AdvertisingEngines = dbContext.AdvertisingEngines; model.ProductGroups = dbContext.Credentials.Where(x => x.UsersFK == cred.UsersFK).First().User.Customer.ProductGroups; model.Detail = dbContext.vwPromotionCharts.Where(t => t.UserPK == cred.UsersFK).OrderBy(t => t.Keyword); model.Configuration = dbContext.Configurations.FirstOrDefault(); return View(model); }
// // GET: /Reporting/ public ActionResult Index() { Credential cred = ((Credential)(Session[Semplest.SharedResources.SEMplestConstants.SESSION_USERID])); SemplestModel.Semplest dbContext = new SemplestModel.Semplest(); 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; ReportIndexModel rim = new ReportIndexModel(); rim.AdvertisingEngines = dbContext.AdvertisingEngines; rim.ProductGroups = dbContext.Credentials.Where(x => x.UsersFK == cred.UsersFK).First().User.Customer.ProductGroups; return View(rim); }
// // GET: /Reporting/ public ActionResult Index() { var cred = ((Credential)(Session[SharedResources.SEMplestConstants.SESSION_USERID])); var dbContext = new SemplestModel.Semplest(); 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; var credential = dbContext.Credentials.FirstOrDefault(x => x.UsersFK == cred.UsersFK); if (credential != null) { var rim = new ReportIndexModel { AdvertisingEngines = dbContext.AdvertisingEngines, ProductGroups = credential.User.Customer.ProductGroups }; return View(rim); } return View(new ReportIndexModel()); }