private void button_pay_Click(object sender, EventArgs e) { //removes all items from the purchasing list and refreshed the listbox foreach (var purchased in store_inventory) { AccessSQLite.UpdateDatabase(purchased); } purchasing.Clear(); update_listbox(); }
private void button_add_Click(object sender, EventArgs e) { Items_products product = new Items_products(); product.name = textBox_name.Text; product.barcode = textBox_barcode.Text; product.price = Double.Parse(textBox_price.Text); product.quantity = Int32.Parse(textBox_quantity.Text); AccessSQLite.SaveItems(product); MessageBox.Show("product added to the database"); mainform.getFromSQLite(); }
private void Button_search_Click(object sender, EventArgs e) { store_inventory.Clear(); store_inventory = AccessSQLite.searchDatabase(search); LoadDataGridView(); }
public Form3() { InitializeComponent(); store_inventory = AccessSQLite.LoadItems(); LoadDataGridView(); }
public void getFromSQLite() {//get from SQLite store_inventory = AccessSQLite.LoadItems(); }