public ActionResult Edit(int moudleId, int menuId, int btnId, StoreIndustriesDto dto) { var entity = Mapper.Map <StoreIndustriesDto, StoreIndustriesEntity>(dto); storeIndustriesService.Update(entity); return(RedirectToAction("Index", RouteData.Values)); }
public ActionResult Add(int moudleId, int menuId, int btnId, StoreIndustriesDto dto) { Random rd = new Random(); dto.Displayorder = rd.Next(1, 100); //1到100之间的数,可任意更改 var entity = dto.MapTo <StoreIndustriesEntity>(); storeIndustriesService.Add(entity); return(RedirectToAction("Index", RouteData.Values)); }