Exemple #1
0
        public void UpdateCostForMinutes(CountryHandler Country)
        {
            CountryHandler CountryInDataBase = this.Countries.Find(Country.CountryHandlerId);

            CountryInDataBase.CostForMinutes = Country.CostForMinutes;
            this.SaveChanges();
        }
Exemple #2
0
 public void AddCountry(CountryHandler NewCountry)
 {
     if (!IsRepeatedCountry(NewCountry.NameOfCountry))
     {
         CountryList.Add(NewCountry);
         using (var MyContext = new MyContext())
             MyContext.AddCountry(NewCountry);
     }
 }
Exemple #3
0
        public void AddAccount(Account NewAccount)
        {
            CountryHandler CountryHandler = NewAccount.Country;
            string         Text           = NewAccount.Mobile;

            if (NewAccount.Balance >= 0 && CountryHandler.ValidateFormatNumberByCountry(ref Text) && !IsRepeatedNumber(Text) &&
                CountryHandler.ValidateIsNumericByCountry(NewAccount.Mobile))
            {
                AccountList.Add(NewAccount);
                using (var MyContext = new MyContext())
                    MyContext.AddAccount(NewAccount);
            }
        }
Exemple #4
0
 public void AddCountry(CountryHandler NewCountry)
 {
     this.Countries.Add(NewCountry);
     this.SaveChanges();
 }
Exemple #5
0
 public void UpdateCostForMinutes(CountryHandler Country)
 {
     using (var MyContext = new MyContext())
         MyContext.UpdateCostForMinutes(Country);
 }
Exemple #6
0
 public List <Purchase> EliminatePurchasesFromAnoterCountry(List <Purchase> PurchasesOnThatDate, CountryHandler Country)
 {
     return(PurchasesOnThatDate.Where(p => p.AccountOfPurchase.Country.CountryHandlerId == Country.CountryHandlerId).ToList());
 }