コード例 #1
0
        //Add a new heath file
        private void buttonHealthFile_Click(object sender, EventArgs e)
        {
            if (dataViewPatient.SelectedRows.Count > 0)
            {
                int patientID = Convert.ToInt32(dataViewPatient.SelectedRows[0].Cells[0].Value);
                int state     = Patient.GetPatient(patientID).State;

                if (state == 1)
                {
                    if (!HeathFile.DidPatientHaveHF(patientID))
                    {
                        FormHFDetail formHFD = new FormHFDetail(patientID);
                        formHFD.ShowDialog();
                    }
                    else
                    {
                        MessageBox.Show("Bệnh nhân đã có bệnh án", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
                else
                {
                    MessageBox.Show("Bệnh nhân chưa nhập viện", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }
コード例 #2
0
        private void buttonHealthFileEdit_Click(object sender, EventArgs e)
        {
            if (dataViewHeathFile.SelectedRows.Count > 0)
            {
                int          heathFileID  = Convert.ToInt32(dataViewHeathFile.SelectedRows[0].Cells[0].Value);
                FormHFDetail formHFDetail = new FormHFDetail(HeathFile.GetHeathFile(heathFileID), "edit");
                formHFDetail.ShowDialog();

                refreshDataViewHeathFile();
            }
        }
コード例 #3
0
        private void dataViewHeathFile_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataViewHeathFile.SelectedRows.Count > 0)
            {
                int heathFileID = Convert.ToInt32(dataViewHeathFile.SelectedRows[0].Cells[0].Value);
                FormHFDetail formHFDetail = new FormHFDetail(HeathFile.GetHeathFile(heathFileID), "edit");
                formHFDetail.ShowDialog();

                refreshDataViewHeathFile();
            }
        }
コード例 #4
0
ファイル: FormMainPatient.cs プロジェクト: hpbaotho/benhvien
        //Add a new heath file
        private void buttonHealthFile_Click(object sender, EventArgs e)
        {
            if (dataViewPatient.SelectedRows.Count > 0)
            {
                int patientID = Convert.ToInt32(dataViewPatient.SelectedRows[0].Cells[0].Value);
                int state = Patient.GetPatient(patientID).State;

                if (state == 1)
                {
                    if (!HeathFile.DidPatientHaveHF(patientID))
                    {
                        FormHFDetail formHFD = new FormHFDetail(patientID);
                        formHFD.ShowDialog();
                    }
                    else
                    {
                        MessageBox.Show("Bệnh nhân đã có bệnh án", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
                else
                {
                    MessageBox.Show("Bệnh nhân chưa nhập viện", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }

        }