Exemplo n.º 1
0
        public IActionResult Index()
        {
            var model = _infoService.GetAll(Data.Enum.InfoType.InfoCompay);

            ViewBag.UrlImage = _webImageService.GetAll(Data.Enum.Position.BreadcrumbContact).FirstOrDefault()?.URLImage;
            return(View(model));
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var model = await Task.Run(() => _infoService.GetAll(Data.Enum.InfoType.Zalo));

            return(View("_OnlineChat", model));
        }
Exemplo n.º 6
0
 private void LoadData()
 {
     lstThamSo            = InfoService.GetAll();
     grcThamSo.DataSource = lstThamSo;
 }
Exemplo n.º 7
0
        public IActionResult Get()
        {
            var model = _infoService.GetAll();

            return(Ok(model));
        }