Exemplo n.º 1
0
        public ActionResult ContactUs()
        {
            //var menuLink = _menuLinkService.GetById(id);

            var contactInformation = _contactInfoService.FindBy(x => x.Status == (int)Status.Enable, true);

            if (contactInformation == null)
            {
                return(HttpNotFound());
            }

            var contactInformationLocalize = contactInformation.Select(x => x.ToModel());

            //var breadCrumbs = new List<BreadCrumb>();
            //if (menuLink != null)
            //{
            //    breadCrumbs.Add(new BreadCrumb
            //    {
            //        Title = menuLink.GetLocalized(m => m.MenuName, menuLink.Id),
            //        Current = false,
            //        Url = Url.Action("GetContent", "Menu", new { area = "", menu = menuLink.SeoUrl })
            //    });
            //    ViewBag.MenuId = menuLink.Id;
            //}
            //ViewBag.BreadCrumb = breadCrumbs;

            //ViewBag.Title = title;
            ViewBag.Contact = contactInformationLocalize;

            var contact = new ContactForm();

            return(PartialView(contact));
        }
Exemplo n.º 2
0
        public ActionResult GetStoreListByProvince(int id)
        {
            if (!Request.IsAjaxRequest())
            {
                return(Json(new { success = false }));
            }
            var contactInformations = _contactInfoService.FindBy(x => x.Status == 1 && x.ProvinceId == (int?)id, true);
            var storeLists          = new List <StoreList>();

            if (contactInformations.IsAny())
            {
                storeLists.AddRange(
                    from item in contactInformations
                    select new StoreList
                {
                    Address = item.Address,
                    Lat     = item.Lat,
                    Lng     = item.Lag,
                    Phone   = item.MobilePhone,
                    Title   = item.Title
                });
            }
            return(Json(new { data = storeLists, success = true }));
        }
Exemplo n.º 3
0
        public ActionResult ContactUs()
        {
            var contactInformation = _contactInfoService.FindBy(x => x.Status == (int)Status.Enable, true);

            if (contactInformation == null)
            {
                return(HttpNotFound());
            }

            var contactInformationLocalize = contactInformation.Select(x => x.ToModel());

            //ViewBag.Title = title;
            ViewBag.Contact = contactInformationLocalize;

            var contact = new ContactForm();

            return(PartialView(contact));
        }