예제 #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            dbClass db = new dbClass();

            db.dbInsert("INSERT INTO items (name,price,owner,quantity,slot) VALUES ('" + txtItemName.Text + "', " + txtItemPrice.Text + ", '" + cmbItemOwner.Text + "', " + numItemQuantity.Value + ", '" + txtItemSlot.Text + "')");
            this.Close();
            MessageBox.Show("Item added!");
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            dbClass db = new dbClass();

            db.dbInsert($"INSERT INTO Owners(name, contact) VALUES('{txtOwner.Text}', '{txtContact.Text}')");
            this.Close();
            MessageBox.Show($"Owner {txtOwner.Text} added!");
        }