コード例 #1
0
        public bool ScheduleTax(string municipalityName, Tax tax)
        {
            var municipality = _municipalityRepo.Get(municipalityName);

            if (municipality == null || municipality.IsTaxOverlapping(tax))
            {
                return(false);
            }

            tax.MunicipalityId = municipality.Id;
            _taxRepository.Add(tax);
            _taxRepository.Save();
            return(true);
        }
コード例 #2
0
 public bool Save(lmsTaxMaster entity)
 {
     try
     {
         if (entity.TAXID > 0)
         {
             taxRepository.Edit(entity);
         }
         else
         {
             taxRepository.Add(entity);
         }
         taxRepository.Save();
         return(true);
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #3
0
 private void SaveChanges()
 {
     _municipalityRepo.Save();
     _taxRepository.Save();
 }