private void loadToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Shop.Load();
     ClientBindingSource.ResetBindings(false);
     ForSaleBindingSource.ResetBindings(false);
     Shop.IsDirty = false;
 }
示例#2
0
 public LogForm()
 {
     InitializeComponent();
     Shop = new PawnShop();
     if (File.Exists("shop.bin"))
     {
         Shop.Load();
     }
     else
     {
         Shop.FillTestData(100);
     }
 }
示例#3
0
        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());
        }