コード例 #1
0
        public IActionResult Detail(WareHouse wareHouse)
        {
            if (!_permissionService.Authorize("EditWareHouse"))
            {
                return(View("_AccessDeniedView"));
            }
            var result = _wareHouseService.GetCountByCode(wareHouse.Code);
            var data   = result.ToList().Where(r => r.Id != wareHouse.Id);

            if (data.Count() > 0)
            {
                return(Error("已有相同编码仓库"));
            }
            _wareHouseService.UpdateWareHouse(wareHouse);
            return(Success());
        }