public ActionResult Index() { NotificationObj.TaskSrok(Guid.Parse(User.Identity.GetUserId()), string.Format(Url.Content("~/Task/Calendar"))); UserOnline.online(); using (var db = new ApplicationDbContext()) { ViewBag.UserList = db.Users.ToList(); } return(View(obj.ViewsListObj())); }
public ActionResult Index() { NotificationObj.TaskNot(Url.Content("~/Task/Index")); NotificationObj.TaskSrok(Guid.Parse(User.Identity.GetUserId()), string.Format(Url.Content("~/Task/Calendar"))); UserOnline.online(); var db = new ApplicationDbContext(); var newProducts = from newprod in db.Products.ToList() //where (DateTime.Now - newprod.Date <= new TimeSpan(7, 0, 0, 0)) select newprod; var events = db.Events.ToList(); var user = Guid.Parse(User.Identity.GetUserId()); ViewBag.newProducts = newProducts.Count(); ViewBag.totalSum = string.Format("{0:N0}", 4); ViewBag.events = events; return(View()); }