コード例 #1
0
        private void dataViewSurgical_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataViewSurgical.SelectedRows.Count > 0)
            {
                int                surgicalID     = Convert.ToInt32(dataViewSurgical.SelectedRows[0].Cells[0].Value);
                Surgical           updateSurgical = Surgical.GetSurgical(surgicalID);
                FormSurgicalDetail formSD         = new FormSurgicalDetail(updateSurgical, "edit");
                formSD.ShowDialog();

                refreshDataViewSurgical();
                refreshDataViewSurgicalDetail();
            }
        }
コード例 #2
0
        //Add a new surgical
        private void buttonPatientSurgery_Click(object sender, EventArgs e)
        {
            if (dataViewPatient.SelectedRows.Count > 0)
            {
                int patientID = Convert.ToInt32(dataViewPatient.SelectedRows[0].Cells[0].Value);

                if (Patient.GetPatient(patientID).State == 1)
                {
                    FormSurgicalDetail formSD = new FormSurgicalDetail(patientID);
                    formSD.ShowDialog();
                }
                else
                {
                    MessageBox.Show("Bệnh nhân chưa nhập viện nên không thể thực hiện phẩu thuật", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }
コード例 #3
0
ファイル: FormMainPatient.cs プロジェクト: hpbaotho/benhvien
        //Add a new surgical
        private void buttonPatientSurgery_Click(object sender, EventArgs e)
        {
            if (dataViewPatient.SelectedRows.Count > 0)
            {
                int patientID = Convert.ToInt32(dataViewPatient.SelectedRows[0].Cells[0].Value);

                if (Patient.GetPatient(patientID).State == 1)
                {
                    FormSurgicalDetail formSD = new FormSurgicalDetail(patientID);
                    formSD.ShowDialog();
                }
                else
                {
                    MessageBox.Show("Bệnh nhân chưa nhập viện nên không thể thực hiện phẩu thuật", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }

        }
コード例 #4
0
ファイル: FormMainSurgical.cs プロジェクト: hpbaotho/benhvien
        private void buttonSurgeryEdit_Click(object sender, EventArgs e)
        {
            if (dataViewSurgical.SelectedRows.Count > 0)
            { 
                int surgicalID = Convert.ToInt32(dataViewSurgical.SelectedRows[0].Cells[0].Value);
                Surgical updateSurgical = Surgical.GetSurgical(surgicalID);
                FormSurgicalDetail formSD = new FormSurgicalDetail(updateSurgical, "edit");
                formSD.ShowDialog();
 
                refreshDataViewSurgical();
                refreshDataViewSurgicalDetail();
            }

        }