Ejemplo n.º 1
0
        private void btnRemove_Click(object sender, EventArgs e)
        {
            MarikinaOpticalEntities dbContext = new MarikinaOpticalEntities();
            DialogResult            result    = MessageBox.Show("Are you sure you want to remove this Patient - " + lblPatientName.Text + " ?", "Information", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (result == DialogResult.Yes)
            {
                dbContext.RemovePatientInformation(Convert.ToInt32(lblPatientId.Text));
                PatientLoad();
                MessageBox.Show("Patient is already removed!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }