Ejemplo n.º 1
0
        public void UpdateCostForMinutes(CountryHandler Country)
        {
            CountryHandler CountryInDataBase = this.Countries.Find(Country.CountryHandlerId);

            CountryInDataBase.CostForMinutes = Country.CostForMinutes;
            this.SaveChanges();
        }
Ejemplo n.º 2
0
 public void AddCountry(CountryHandler NewCountry)
 {
     if (!IsRepeatedCountry(NewCountry.NameOfCountry))
     {
         CountryList.Add(NewCountry);
         using (var MyContext = new MyContext())
             MyContext.AddCountry(NewCountry);
     }
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 4
0
 public void AddCountry(CountryHandler NewCountry)
 {
     this.Countries.Add(NewCountry);
     this.SaveChanges();
 }
Ejemplo n.º 5
0
 public void UpdateCostForMinutes(CountryHandler Country)
 {
     using (var MyContext = new MyContext())
         MyContext.UpdateCostForMinutes(Country);
 }
Ejemplo n.º 6
0
 public List <Purchase> EliminatePurchasesFromAnoterCountry(List <Purchase> PurchasesOnThatDate, CountryHandler Country)
 {
     return(PurchasesOnThatDate.Where(p => p.AccountOfPurchase.Country.CountryHandlerId == Country.CountryHandlerId).ToList());
 }