Esempio n. 1
0
        public ActionResult ContactUs(int Id)
        {
            int languageId = _workContext.WorkingLanguage.Id;

            MenuLink menuLink = this._menuLinkService.Get((MenuLink x) => x.Id == Id, true);

            ContactInformation contactInformation = this._contactInfoService.Get((ContactInformation x) => x.Type == 1 && x.Status == 1, true);

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

            ContactInformation contactInformationLocalize = new ContactInformation
            {
                Lag           = contactInformation.Lag,
                Lat           = contactInformation.Lat,
                Type          = contactInformation.Type,
                Status        = contactInformation.Status,
                Email         = contactInformation.Email,
                Hotline       = contactInformation.Hotline,
                MobilePhone   = contactInformation.MobilePhone,
                Fax           = contactInformation.Fax,
                NumberOfStore = contactInformation.NumberOfStore,
                ProvinceId    = contactInformation.ProvinceId,
                Title         = contactInformation.GetLocalizedByLocaleKey(contactInformation.Title, contactInformation.Id, languageId, "ContactInformation", "Title"),
                Address       = contactInformation.GetLocalizedByLocaleKey(contactInformation.Address, contactInformation.Id, languageId, "ContactInformation", "Address"),
            };

            ((dynamic)base.ViewBag).Contact = contactInformationLocalize;
            return(base.PartialView(menuLink));
        }