Esempio n. 1
0
        public KSociety.Com.App.Dto.Res.Remove.Common.Tag Execute(Tag request)
        {
            var commonTag = _tagRepository.Find(request.Id); //.GetAllTag().SingleOrDefault(tag => tag.Id == request.Id);

            _tagRepository.Delete(commonTag);

            return(new KSociety.Com.App.Dto.Res.Remove.Common.Tag(_unitOfWork.Commit() > 0));
        }
Esempio n. 2
0
        public KSociety.Com.App.Dto.Res.Remove.Logix.LogixTag Execute(LogixTag request)
        {
            var logixTag = _tagRepository.Find(request.Id); //.GetAllLogixTag().SingleOrDefault(g => g.Id == request.Id);

            _tagRepository.Delete(logixTag);

            return(new KSociety.Com.App.Dto.Res.Remove.Logix.LogixTag(_unitOfWork.Commit() > 0));
        }
Esempio n. 3
0
        public KSociety.Com.App.Dto.Res.Remove.S7.S7Tag Execute(S7Tag request)
        {
            try
            {
                //foreach (var VARIABLE in _tagRepository.GetAllS7Tag().Where(g => g.Id == request.Id))
                //{
                //    _logger.LogInformation(VARIABLE.Name + " " + VARIABLE.Id + " " + request.Id);
                //}
                var s7Tag = _tagRepository.Find(request.Id); //.GetAllS7Tag().SingleOrDefault(g => g.Id == request.Id);

                _tagRepository.Delete(s7Tag);
                var result = new KSociety.Com.App.Dto.Res.Remove.S7.S7Tag(_unitOfWork.Commit() > 0);
                return(result);
            }
            catch (Exception ex)
            {
                _logger.LogError("" + ex.Message + " - " + ex.StackTrace);
                return(new KSociety.Com.App.Dto.Res.Remove.S7.S7Tag(false));
            }
        }
Esempio n. 4
0
 public object TagDelete(int id)
 {
     _Tag.Delete(id);
     return(id);
 }
Esempio n. 5
0
 public bool Delete(string ID)
 {
     return(dal.Delete(ID));
 }
Esempio n. 6
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public bool Delete(string TName, int TUserId, int TFileId)
 {
     return(dal.Delete(TName, TUserId, TFileId));
 }
Esempio n. 7
0
        public async Task <IActionResult> TagDelete(string NorTag)
        {
            await _tagService.Delete(NorTag);

            return(RedirectToAction("Tags"));
        }