public List<DomesticWhtRate> GetDomesticRate(string countryCode)
 {
     var response = new WTRateBusiness().GetSingleDomesticRate(countryCode);
     if (response.Success)
     {
         return response.Data;
     }
     throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.BadRequest));
 }
 public WTRateWithMetaData Get(int hostCountryId, int homeCountryId, string streamId)
 {
     var response = new WTRateBusiness().GetSingleWTRate(hostCountryId, homeCountryId, streamId);
     if (response.Success)
     {
         return response.Data;
     }
     throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.BadRequest));
 }
 public List<WrapperWTRateContract> Get(int hostCountryId, string hostCountries)
 {
     if (hostCountries == null) return new List<WrapperWTRateContract>();
     try
     {
         var countryIdAry = hostCountries.Split(',').Select(b => Convert.ToInt32(b)).ToArray();
         var response = new WTRateBusiness().GetAllWTRates(hostCountryId, countryIdAry);
         if (response.Success)
         {
             return response.Data;
         }
         else
         {
             throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.NoContent));
         }
     }
     catch
     {
         throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.BadRequest));
     }
 }
 public WtrTempData Get(string hostCountryCode, string hostCountries)
 {
     if (hostCountries == null || hostCountries.Trim()==hostCountryCode.Trim()) return new WtrTempData();
     try
     {
         var countryIdAry = hostCountries.Split(',').Select(b =>b).ToArray();
         var response = new WTRateBusiness().GetAllWTRates(hostCountryCode, countryIdAry);
         if (response.Success)
         {
             return response.Data;
         }
         else
         {
             throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.NoContent));
         }
     }
     catch
     {
         throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.BadRequest));
     }
 }
Example #5
0
 public TreatyWithWTRRates GetsingleDomesticRate(string hostCountryCode)
 {
     var singleDomesticRate = new WTRateBusiness().GetSingleDomesticRate(hostCountryCode);
     TreatyWithWTRRates trWithWTR = new TreatyWithWTRRates()
     {
         DivSubstantialHoldingRate = singleDomesticRate.Data[0].DividendsRate,
         DivPortfolioRate = "",
         InterestGeneralRate = singleDomesticRate.Data[0].InterestRate,
         InterestCbRate = "",
         InterestBankRate = "",
         RoyaltyPatentRate = singleDomesticRate.Data[0].RoyalityRate,
         RoyaltyCrRate = "",
         RoyaltyLpRate = "",
         RoyaltyTmRate = "",
         DivSubstantialHoldingRateArticleLine = "",
         DivportfolioRateArticleLine = "",
         InterestGeneralRateArticleLine = "",
         InterestBankRateArticleLine = "",
         InterestCbRateArticleLine = "",
         RoyaltyPatentRateArticleLine = "",
         RoyaltyCrRateArticleLine = "",
         RoyaltyLpRateArticleLine = "",
         RoyaltyTmRateArticleLine = "",
         Country = "Domestic WHT rates",
         CountryId = 0,
         CountryCode = singleDomesticRate.Data[0].Code,
         EffectiveDate = "",
         EntryIntoForce = "",
         Id = 0,
         IsContentAvailable = false,
         Status = "",
         Title = "",
         IsContentAvailableForDividendRate = false,
         IsContentAvailableForInterestRate = false,
         IsContentAvailableForRoyaltyRate = false,
     };
     return trWithWTR;
 }