コード例 #1
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            dbClass db = new dbClass();

            db.dbUpdate("UPDATE items SET name='" + txtItemName.Text + "', price=" + txtItemPrice.Text + ", owner='" + cmbItemOwner.Text + "', quantity=" + numItemQuantity.Value + ", slot='" + txtItemSlot.Text + "' WHERE id='" + this.uid + "'");
            this.Close();
            MessageBox.Show("Item Updated with uid: " + this.uid);
        }
コード例 #2
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            dbClass db = new dbClass();

            db.dbUpdate($"UPDATE Owners SET name='{txtOwner.Text}', contact='{txtContact.Text}' WHERE id='{this.uid}'");
            this.Close();
            MessageBox.Show("Owner Updated!");
        }