public void FillData() { Contora store = new Contora(); store.FillTestData(10); Assert.AreEqual("Flat0", store.Flats[0].Name); }
public Menu() { store = new Contora(); InitializeComponent(); flatBindingSource.DataSource = store.Flats; store.Load(); flatBindingSource.ResetBindings(false); }
public ShowCustomers() { store = new Contora(); InitializeComponent(); store.Load(); buyerBindingSource.DataSource = store.Buyers; buyerBindingSource.ResetBindings(false); }
public YourOptions(ref Contora contora, Buyer buyer) { InitializeComponent(); this.contora = contora; this.presentByer = buyer; presentFlat = new List <Flat>(); presentFlat.AddRange(contora.Flats.Where(o => Convert.ToInt32(o.Price) == 5000)); flatBindingSource.DataSource = presentFlat; }
public void Load() { using (Stream stream = File.OpenRead(filePath)) { var serializer = new BinaryFormatter(); Contora st = (Contora)serializer.Deserialize(stream); Copy(st.Flats, store.Flats); Copy(st.Buyers, store.Buyers); } void Copy <T>(List <T> from, List <T> to) { to.Clear(); to.AddRange(from); } }
public Register(ref Contora store) { this.store = store; InitializeComponent(); }
public Dao(Contora store) { this.store = store; }
public AutorizationRealt() { store = new Contora(); InitializeComponent(); }
public NewFlat() { store = new Contora(); InitializeComponent(); }