Beispiel #1
0
        // Add new patient when click add button
        private void buttonPatientAdd_Click(object sender, EventArgs e)
        {
            // Open patientdetail form for add
            FormPatientDetail patientDetailForm = new FormPatientDetail("add", new Patient());
            patientDetailForm.ShowDialog();

            // Refresh datagridview after add
            refreshDataViewPatient();
        }
Beispiel #2
0
        // Add new patient when click add button
        private void buttonPatientAdd_Click(object sender, EventArgs e)
        {
            // Open patientdetail form for add
            FormPatientDetail patientDetailForm = new FormPatientDetail("add", new Patient());

            patientDetailForm.ShowDialog();

            // Refresh datagridview after add
            refreshDataViewPatient();
        }
Beispiel #3
0
        private void dataViewPatient_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataViewPatient.SelectedRows.Count > 0)
            {
                // Get patient for edit
                Patient PatientDetail = Patient.GetPatient(Convert.ToInt32(dataViewPatient.SelectedRows[0].Cells[0].Value.ToString()));

                // Open patientdetail form for edit
                FormPatientDetail patientDetailForm = new FormPatientDetail("edit", PatientDetail);
                patientDetailForm.ShowDialog();

                // Refresh datagridview after edit
                refreshDataViewPatient();
            }
        }
Beispiel #4
0
        // Edit patient's information when click edit button
        private void buttonPatientEdit_Click(object sender, EventArgs e)
        {
            if (dataViewPatient.SelectedRows.Count > 0)
            {
                // Get patient for edit
                Patient PatientDetail = Patient.GetPatient(Convert.ToInt32(dataViewPatient.SelectedRows[0].Cells[0].Value.ToString()));

                // Open patientdetail form for edit
                FormPatientDetail patientDetailForm = new FormPatientDetail("edit", PatientDetail);
                patientDetailForm.ShowDialog();

                // Refresh datagridview after edit
                refreshDataViewPatient();
            }

        }