Esempio n. 1
0
        private void btndelete_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Are you sure you want to delete the resident in " + txtapartiment.Text + "?", "Warning!", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                ClsSqlServer DeleteCommand = new ClsSqlServer();
                DeleteCommand.DeleteCustomer(txtapartiment.Text);

                MessageBox.Show("Data Deleted Successfully", "Information");
                txtapartiment.Text = "";
                txtfname.Text      = "";
                txtlname.Text      = "";
                cmbgender.Text     = "";
                txtphone.Text      = "";
                cmbpayment.Text    = "";
                dTPicker1.Value    = DateTime.Today;
            }
            else
            {
                txtapartiment.Focus();
            }
        }