public ActionResult Edit(string id) { var userLogin = _userStoreService.GetUserByName(User.Identity.Name); ViewBag.UserLogin = userLogin; //GetViewData(); GetFunctionsView(userLogin.UserId); var model = _newStoreService.GetNewById(id); ViewBag.Category = _categoryStoreSevice.GetListCategory(null); return(View(model)); }
public EventViewModels GetEventDetailContent(string id) { var data = new EventViewModels(); var config = new ConfigService(); var news = new NewService(); var block = new BlockService(); //data.ListNewDetail = news.GetNewById("34"); data.BlockFooter = block.GetBlockBySection("5"); data.HotLineTitle = config.GetConfigById("HOTLINE_TITLE").Value; data.HotLine = config.GetConfigById("HOTLINE").Value; data.SiteMain = config.GetConfigById("SITE_MAIN").Value; data.ContactTitle = config.GetConfigById("CONTACT_TITLE").Value; data.CopyRight = config.GetConfigById("COPY_RIGHT").Value; data.Email_Server = config.GetConfigById("EMAIL_CONTACT").Value; data.Pass_Email_Server = config.GetConfigById("PASS_EMAIL_SERVER").Value; data.Email_To = config.GetConfigById("EMAIL_TO").Value; data.ListNewDetail = news.GetNewById(id); return(data); }