Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
        //
        // 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);
        }
Ejemplo n.º 5
0
        //
        // 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());
        }