コード例 #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();
        }
コード例 #2
0
ファイル: Form2.cs プロジェクト: benaa456/C-StoreApp
        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();
        }
コード例 #3
0
 private void Button_search_Click(object sender, EventArgs e)
 {
     store_inventory.Clear();
     store_inventory = AccessSQLite.searchDatabase(search);
     LoadDataGridView();
 }
コード例 #4
0
 public Form3()
 {
     InitializeComponent();
     store_inventory = AccessSQLite.LoadItems();
     LoadDataGridView();
 }
コード例 #5
0
 public void getFromSQLite()
 {//get from SQLite
     store_inventory = AccessSQLite.LoadItems();
 }