示例#1
0
        public async Task <int> Update(HtmlLoadModel model)
        {
            var entity = await _pageDetailsRepository.GetById(model.Id);

            if (entity == null)
            {
                throw new NullReferenceException("Cannot find HTML !!!");
            }
            entity.Description = model.Html;
            await _pageDetailsRepository.Update(entity);

            return(entity.RPageDetailsId);
        }
示例#2
0
        public async Task <HtmlLoadModel> Load(HtmlLoadModel model)
        {
            if (model.Id == 0)
            {
            }
            else
            {
                model = await GetById(model.Id);
            }

            model.Codes = await Lookup();

            return(model);
        }
示例#3
0
        public async Task <IActionResult> PageDetails_Save(HtmlLoadModel model)
        {
            await _htmlService.Update(model);

            return(RedirectToAction("PageDetails"));
        }
示例#4
0
 public async Task <IActionResult> PageDetails_GetHTML(HtmlLoadModel model)
 {
     return(View("PageDetails", await _htmlService.Load(model)));
 }