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