Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        private void showClientsBtn_Click(object sender, EventArgs e)
        {
            clientDB db = new clientDB();

            showClientListLbl.Text = db.ShowClients();
        }