예제 #1
0
        public void UpdateCost(int newValue)
        {
            CostPerMinute newCost = GetActualCost();

            newCost.Value = newValue;
            costRepository.Update(newCost);
        }
예제 #2
0
        public CostPerMinute GetActualCost()
        {
            CostPerMinute a = costRepository.Get
                                  ("", ActualCountry.GetCountryTag());

            return(a);
        }
예제 #3
0
        private void LoadInicialCost()
        {
            CostPerMinute inicialCostUy = new CostPerMinute()
            {
                Value      = INICIAL_DEFAULT_COSTPERMINUTE,
                CountryTag = "UY"
            };

            CostPerMinute inicialCostAr = new CostPerMinute()
            {
                Value      = INICIAL_DEFAULT_COSTPERMINUTE,
                CountryTag = "AR"
            };
            CostPerMinute a = GetActualCost();

            if (a == null)
            {
                costRepository.Add(inicialCostUy);
                costRepository.Add(inicialCostAr);
            }
        }