示例#1
0
        public void FillData()
        {
            Contora store = new Contora();

            store.FillTestData(10);
            Assert.AreEqual("Flat0", store.Flats[0].Name);
        }
示例#2
0
 public Menu()
 {
     store = new Contora();
     InitializeComponent();
     flatBindingSource.DataSource = store.Flats;
     store.Load();
     flatBindingSource.ResetBindings(false);
 }
示例#3
0
 public ShowCustomers()
 {
     store = new Contora();
     InitializeComponent();
     store.Load();
     buyerBindingSource.DataSource = store.Buyers;
     buyerBindingSource.ResetBindings(false);
 }
示例#4
0
 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;
 }
示例#5
0
        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);
            }
        }
示例#6
0
 public Register(ref Contora store)
 {
     this.store = store;
     InitializeComponent();
 }
示例#7
0
 public Dao(Contora store)
 {
     this.store = store;
 }
 public AutorizationRealt()
 {
     store = new Contora();
     InitializeComponent();
 }
示例#9
0
 public NewFlat()
 {
     store = new Contora();
     InitializeComponent();
 }