예제 #1
0
        public void RemoveForm1(string keyValue)
        {
            int count = _moduleRepository.GetAll().Where(t => t.F_ParentId == keyValue).Count();

            if (count > 0)
            {
                throw new Exception("当前所选数据有子节点数据!");
            }
            _moduleColumnRepository.Delete(t => t.F_ModuleId.Equals(keyValue));
            _moduleButtonRepository.Delete(t => t.F_ModuleId.Equals(keyValue));
            _moduleRepository.Delete(keyValue);
        }
예제 #2
0
        public string RemoveForm(string keyValue)
        {
            int count = _moduleRepository.GetAll().Where(t => t.F_ParentId == keyValue).Count();

            if (count > 0)
            {
                return("当前所选数据有子节点数据!");
            }
            _moduleColumnRepository.Delete(t => t.F_ModuleId.Equals(keyValue));
            _moduleButtonRepository.Delete(t => t.F_ModuleId.Equals(keyValue));
            _moduleRepository.Delete(keyValue);
            return("删除成功!");
        }