public void refresh() { PatientMgr patMgr = new PatientMgr(); listView_waitingList.Enabled = false; textBox_waitingList_refreshDtm.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); patMgr.refreshWaitingList(listView_waitingList); listView_waitingList.Enabled = true; }
private void button_search_Click(object sender, EventArgs e) { if (input_validation()) { PatientMgr patMgr = new PatientMgr(); listBox_search_result.Enabled = false; patMgr.setSearchPatientResultListbox(listBox_search_result, textBox_search_patientID.Text.Trim(), textBox_search_IDNo.Text.Trim(), textBox_search_phoneNo.Text.Trim(), inclDeceased); if (listBox_search_result.Items.Count > 0) { listBox_search_result.SelectedIndex = 0; } listBox_search_result.Enabled = true; } }
private void button_confirm_Click(object sender, EventArgs e) { PatientMgr patMgr = new PatientMgr(); isChkSuccess.Value = patMgr.patPwChk(patId, PasswordHash.getHashedPw(textBox_pw.Text)); if (isChkSuccess.Value == "0") { MessageBox.Show("密碼錯誤!", "密碼錯誤", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { this.Hide(); } }
private void button_patDataUpdate_Click(object sender, EventArgs e) { //input validation if (!patientRegistration1.input_validation()) { return; } if (Login.user == null) { PermissibleValueObj pwChkStatus = new PermissibleValueObj("", "0"); PatientPwChk patPwChk = new PatientPwChk(); patPwChk.setPatIdSuccessFlag(pat.PatientId, ref pwChkStatus); patPwChk.ShowDialog(); if (pwChkStatus.Value == "0") { return; } } String statusMsg = ""; PatientMgr patMgr = new PatientMgr(); bool isSuccess; if (Login.user == null) { isSuccess = patMgr.amdPatientRecordByPatient(pat.PatientId, patientRegistration1.getChiName(), Utilities.stringDataParse4SQL(patientRegistration1.getEngName()), (patientRegistration1.getPlainTextPassword().Trim().Length > 0 ? patientRegistration1.getHashedPassword() : ""), patientRegistration1.getPIDDocType(), patientRegistration1.getPIDDocNo(), patientRegistration1.getPhoneNo(), patientRegistration1.getDOB(), patientRegistration1.getSex(), patientRegistration1.getIsG6PD(), Utilities.stringDataParse4SQL(patientRegistration1.getAddr().Trim()), patientRegistration1.getAllergicDrugsIdString(), patientRegistration1.getIsPregnant(), patientRegistration1.getIsRecordShared(), ref statusMsg); } else { isSuccess = patMgr.amdPatientRecord(pat.PatientId, patientRegistration1.getChiName(), Utilities.stringDataParse4SQL(patientRegistration1.getEngName()), (patientRegistration1.getPlainTextPassword().Trim().Length > 0 ? patientRegistration1.getHashedPassword() : ""), patientRegistration1.getPIDDocType(), patientRegistration1.getPIDDocNo(), patientRegistration1.getPhoneNo(), patientRegistration1.getDOB(), patientRegistration1.getSex(), patientRegistration1.getIsG6PD(), Utilities.stringDataParse4SQL(patientRegistration1.getAddr().Trim()), patientRegistration1.getAllergicDrugsIdString(), patientRegistration1.getIsDeceased(), patientRegistration1.getIsPregnant(), patientRegistration1.getIsRecordShared(), ref statusMsg); } if (isSuccess) { MessageBox.Show(statusMsg, "", MessageBoxButtons.OK, MessageBoxIcon.Information); pat = null; patientRegistration1.reset(); searchPatientInputPanel1.reset(); } else { MessageBox.Show(statusMsg, "", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public NewPatient() { patMgr = new PatientMgr(); InitializeComponent(); }