public IActionResult Index() { var model = _infoService.GetAll(Data.Enum.InfoType.InfoCompay); ViewBag.UrlImage = _webImageService.GetAll(Data.Enum.Position.BreadcrumbContact).FirstOrDefault()?.URLImage; return(View(model)); }
private void LoadThamSoHeThong() { General.lstThamSo = InfoService.GetAll(); foreach (Info tmp in General.lstThamSo) { switch (tmp.Ma) { case "p_TenDv": General.TenDv = tmp.GiaTri; break; case "p_DiaChi": General.DiaChi = tmp.GiaTri; break; case "p_KB_Dv": General.KBDv = tmp.GiaTri; break; case "p_Ma_TKKT": General.MaTkkt = tmp.GiaTri; break; case "p_Ma_DV_QHNS": General.MaDvQhns = tmp.GiaTri; break; } } General.NamKeToan = GetXmlInfo.GetNamKeToan(); }
public async Task <IViewComponentResult> InvokeAsync() { var footerModel = new FooterModel(); footerModel.Infos = await Task.Run(() => _infoService.GetAll(Data.Enum.InfoType.InfoCompay)); footerModel.PageContents = _pageContentService.GetAll(true, Data.Enum.Languages.Vi); return(View("_Footer", footerModel)); }
private async Task <List <Info> > GetInfoAsync(LocationApi location) { List <Info> infos = await _infoService.GetAll(); List <Info> nearby = new List <Info>(); foreach (var info in infos) { var eventLocation = _locationService.GetById(info.LocationId.ToString()); var inRadius = Math.Pow((location.Latitude - eventLocation.Latitude) * DegreeToKm, 2) + Math.Pow((location.Longitude - eventLocation.Longitude) * DegreeToKm, 2) < Math.Pow(Radius, 2); if (inRadius) { nearby.Add(info); } } return(nearby); }
public async Task <IViewComponentResult> InvokeAsync() { var model = await Task.Run(() => _infoService.GetAll(Data.Enum.InfoType.Zalo)); return(View("_OnlineChat", model)); }
private void LoadData() { lstThamSo = InfoService.GetAll(); grcThamSo.DataSource = lstThamSo; }
public IActionResult Get() { var model = _infoService.GetAll(); return(Ok(model)); }