private void btnAdd_Click(object sender, EventArgs e) { clientDB db = new clientDB(); if (txtAddName.Text != "" && txtAddIDCard.Text != "" && txtAddPNC.Text != "" && txtAddAddress.Text != "") { db.insertClient(txtAddName.Text, txtAddIDCard.Text, txtAddPNC.Text, txtAddAddress.Text); } else { MessageBox.Show("All fields must be filled!", "Some Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } showAddClientLbl.Text = db.ShowClients(); }
private void updateBtn_Click(object sender, EventArgs e) { clientDB db = new clientDB(); if (txtUName.Text != "" && txtUidCard.Text != "" && txtUPNC.Text != "" && txtUAddress.Text != "") { db.updateClient(txtUName.Text, txtUidCard.Text, txtUPNC.Text, txtUAddress.Text, txtUpdatePNC.Text); } else { MessageBox.Show("All fields must be filled!", "Some Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } showClientsUpdatedLbl.Text = db.ShowClients(); }
private void showClientsBtn_Click(object sender, EventArgs e) { clientDB db = new clientDB(); showClientListLbl.Text = db.ShowClients(); }