Ejemplo n.º 1
0
        public IActionResult CustomPageEdit(Guid id)
        {
            var model     = _indexRecommend.Find(id);
            var viewModel = new SelectDataViewModel()
            {
                Id = model.Id, CategoryId = model.CategoryId, Img = model.Img, Intro = model.Intro, Name = model.Name, Price = model.Price, Sort = model.Sort, TabId = model.TabId.Value, Url = model.Url
            };

            ViewBag.cid   = model.ColumnId;
            ViewBag.tabid = model.TabId.ToString();
            return(View(viewModel));
        }
Ejemplo n.º 2
0
 public IActionResult Reset(ResetPwd reset)
 {
     if (ModelState.IsValid)
     {
         var model = _repositoryEF.Find(reset.Id);
         if (model == null)
         {
             return(Json(new { Data = false }));
         }
         else
         {
             model.Encrypt  = Cryptographer.CreateSalt();
             model.Password = Cryptographer.EncodePassword(reset.Pwd, 1, model.Encrypt);
             _repositoryEF.Update(model);
             _unitOfWork.Commit();
             return(Json(new { Data = true }));
         }
     }
     return(Json(new { Data = false }));
 }
Ejemplo n.º 3
0
        public IActionResult Edit(Guid id)
        {
            var result = _repositoryEF.Find(id);

            return(View(result));
        }
Ejemplo n.º 4
0
        public ActionResult ModuleElementEdit(Guid id)
        {
            var model = _moduleElementRepository.Find(id);

            return(View(model));
        }