private void btnSubmit_Click(object sender, EventArgs e)
        {
            string fullName = InternalGui.NoiChuoi(txtFirstName.Text, txtLastName.Text);
            bool   inserted = NewContactBus.Insert(fullName, txtGroup.Text, txtAddress.Text, txtPhone.Text);

            if (inserted)
            {
                MessageBox.Show("Insert successful");
            }
            else
            {
                MessageBox.Show("Fail");
            }
        }
Beispiel #2
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            string fullName = InternalGui.NoiChuoi(txtFirstName.Text, txtLastName.Text);
            bool   updated  = objBus.Update(int.Parse(txtID.Text), fullName, txtGroup.Text, txtAddress.Text, txtPhone.Text);

            if (updated)
            {
                MessageBox.Show("Update successful");
                FrmContact_Load(sender, e);
            }
            else
            {
                MessageBox.Show("Fail");
            }
        }