private void loadToolStripMenuItem_Click(object sender, EventArgs e) { Shop.Load(); ClientBindingSource.ResetBindings(false); ForSaleBindingSource.ResetBindings(false); Shop.IsDirty = false; }
public LogForm() { InitializeComponent(); Shop = new PawnShop(); if (File.Exists("shop.bin")) { Shop.Load(); } else { Shop.FillTestData(100); } }
static void Main() { PawnShop shop = new PawnShop(); //shop.FillTestData(100); //shop.Save(); //shop.ForSales.Clear(); shop.Load(); Console.WriteLine(shop.ForSales[0].Products[0].Id); Console.ReadKey(); //Application.EnableVisualStyles(); //Application.SetCompatibleTextRenderingDefault(false); //Application.Run(new Form1()); }