Beispiel #1
0
        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();
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
 private void Button_search_Click(object sender, EventArgs e)
 {
     store_inventory.Clear();
     store_inventory = AccessSQLite.searchDatabase(search);
     LoadDataGridView();
 }
Beispiel #4
0
 public Form3()
 {
     InitializeComponent();
     store_inventory = AccessSQLite.LoadItems();
     LoadDataGridView();
 }
Beispiel #5
0
 public void getFromSQLite()
 {//get from SQLite
     store_inventory = AccessSQLite.LoadItems();
 }