示例#1
0
 public virtual void DeleteLichTrinhGiaVe(LichTrinhGiaVe _item)
 {
     if (_item == null)
     {
         throw new ArgumentNullException("LichTrinhGiaVe");
     }
     _LichTrinhGiaVeRepository.Delete(_item);
 }
示例#2
0
        public virtual bool UpdateLichTrinhGiaVe(LichTrinhGiaVe _item)
        {
            if (_item == null)
            {
                throw new ArgumentNullException("LichTrinhGiaVe");
            }
            var existitem = _LichTrinhGiaVeRepository.Table.Where(c => c.LichTrinhID == _item.LichTrinhID && c.DiemDon1_Id == _item.DiemDon1_Id && c.DiemDon2_Id == _item.DiemDon2_Id && c.Id != _item.Id).Count();

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