コード例 #1
0
 private double getPaymentRate(int serviceID, int rateNumber) {
   double result = -1;
   Payment payment = dataManager.getPayment(paymentPeriod, serviceID);
   DiffCounterUtilityRate rate = (DiffCounterUtilityRate) payment.getRate();
   switch (rateNumber) {
     case 1:
       {
         result = rate.getRateValue1();
         break;
       }
     case 2:
       {
         result = rate.getRateValue2();
         break;
       }
     case 3:
       {
         result = rate.getRateValue3();
         break;
       }
     default:
       {
         break;
       }
   }
   return result;
 }
コード例 #2
0
 private int getPaymentBorder(int serviceID, int borderNumber) {
   int result = -1;
   Payment payment = dataManager.getPayment(paymentPeriod, serviceID);
   DiffCounterUtilityRate rate = (DiffCounterUtilityRate) payment.getRate();
   switch (borderNumber) {
     case 1:
       {
         result = rate.getBorder12();
         break;
       }
     case 2:
       {
         result = rate.getBorder23();
         break;
       }
     default:
       {
         break;
       }
   }
   return result;
 }
コード例 #3
0
 private int getCurrentCounterData(int serviceID) {
   CountedPayment payment = (CountedPayment) dataManager.getPayment(paymentPeriod, serviceID);
   return payment.getCurrentCounterData();
 }