Ejemplo n.º 1
0
 public virtual void DeleteHanhTrinhDiemDon(HanhTrinhDiemDon _item)
 {
     if (_item == null)
     {
         throw new ArgumentNullException("HanhTrinhDiemDon");
     }
     _HanhTrinhDiemDonRepository.Delete(_item);
 }
Ejemplo n.º 2
0
        public virtual bool UpdateHanhTrinhDiemDon(HanhTrinhDiemDon _item)
        {
            if (_item == null)
            {
                throw new ArgumentNullException("HanhTrinhDiemDon");
            }
            var existitem = _HanhTrinhDiemDonRepository.Table.Where(c => c.HanhTrinhId == _item.HanhTrinhId && c.DiemDonId == _item.DiemDonId && c.Id != _item.Id).Count();

            if (existitem == 0)
            {
                _HanhTrinhDiemDonRepository.Update(_item);
                return(true);
            }
            return(false);
        }