Beispiel #1
0
        private void buttonRecordAdd_Click(object sender, EventArgs e)
        {
            editFlag = false;

            FormEditVaccination editingForm = new FormEditVaccination();

            editingForm.ShowDialog(this);

            this.displayVaccinationsTableAdapter.Fill(this.medofficeDataSet.displayVaccinations);
        }
Beispiel #2
0
        private void buttonRecordEdit_Click(object sender, EventArgs e)
        {
            if (dataGridViewVaccination.Rows.Count > 0)
            {
                editFlag = true;

                vaccinationKEY = dataGridViewVaccination.CurrentRow.Cells[0].Value.ToString();

                FormEditVaccination editingForm = new FormEditVaccination();
                editingForm.ShowDialog(this);

                this.displayVaccinationsTableAdapter.Fill(this.medofficeDataSet.displayVaccinations);
            }
        }
Beispiel #3
0
        private void buttonRecordDelete_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show(
                "Вы действительно хотите удалить запись о проведенной вакцинации?",
                "Удаление записи",
                MessageBoxButtons.YesNo,
                MessageBoxIcon.Warning,
                MessageBoxDefaultButton.Button1,
                MessageBoxOptions.DefaultDesktopOnly);

            if (result == DialogResult.Yes)
            {
                deleteFlag     = true;
                vaccinationKEY = dataGridViewVaccination.CurrentRow.Cells[0].Value.ToString();

                FormEditVaccination editingForm = new FormEditVaccination();
                editingForm.ShowDialog(this);

                this.displayVaccinationsTableAdapter.Fill(this.medofficeDataSet.displayVaccinations);
            }
        }