示例#1
0
        public IActionResult FooterAdd(UI_Footer model)
        {
            UI_Footer footer;

            footer = uI_FooterService.Get(x => x.WebSiteid == CurrentWebsite.id, CurrentLanguage.id);
            if (footer == null)
            {
                footer = model;
                footer.CreateUserid = LoginUser.id;
                footer.WebSite      = CurrentWebsite;
                footer.Language     = CurrentLanguage;
                uI_FooterService.Add(footer);
            }
            else
            {
                footer.Content = model.Content;

                footer.UpdateUserid = LoginUser.id;
                footer.UpdateDate   = DateTime.UtcNow;
                footer.Language     = CurrentLanguage;
                uI_FooterService.Update(footer);
            }
            uI_FooterService.Save();
            return(View(footer));
        }