public ActionResult CommunicationMap() { List<CommunicationMap> maps = new List<CommunicationMap>(); foreach (var user in db.Users.GetAll()) { CommunicationMap map = new CommunicationMap(); map.Id = user.UserID; map.Location = user.Location; Country country = db.Countries.Get(user.Country); if (country != null) { float offset = country.UtcOffset; for (int i = 0; i < 24; i++) { map.Hours.Add(getNum(i + offset)); } } maps.Add(map); } return View(maps); }
public ActionResult CommunicationMap() { List <CommunicationMap> maps = new List <CommunicationMap>(); foreach (var user in db.Users.GetAll()) { CommunicationMap map = new CommunicationMap(); map.Id = user.UserID; map.Location = user.Location; Country country = db.Countries.Get(user.Country); if (country != null) { float offset = country.UtcOffset; for (int i = 0; i < 24; i++) { map.Hours.Add(getNum(i + offset)); } } maps.Add(map); } return(View(maps)); }