コード例 #1
0
 // save the data just before the form closes
 private void frmProducts_FormClosing(object sender, FormClosingEventArgs e)
 {
     ProductDB.SaveProducts(products);
 }
コード例 #2
0
 // read product from the file and display
 private void frmProducts_Load(object sender, EventArgs e)
 {
     products = ProductDB.ReadProducts();
     DisplayProducts();
 }
コード例 #3
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     ProductDB.SaveProducts(products);
 }