private void autoCompleteUC1_SelectedValueChanged(object sender, object e) { try { trn_carotid_hdr carotid = _PatientRegis.trn_carotid_hdrs.FirstOrDefault(); if (carotid != null) { if (e == null) { carotid.tch_doctor_code = null; carotid.tch_doctor_license = null; carotid.tch_doctor_name_en = null; carotid.tch_doctor_name_th = null; } else { carotid.tch_doctor_code = ((DoctorProfile)e).SSUSR_Initials; carotid.tch_doctor_license = ((DoctorProfile)e).CTPCP_SMCNo; DoctorName dn = obj.GetDoctorName(((DoctorProfile)e).CTPCP_Desc); carotid.tch_doctor_name_en = dn.NameEN; carotid.tch_doctor_name_th = dn.NameTH; } } } catch (Exception ex) { Program.MessageError(this.Name, "autoCompleteUC1_SelectedValueChanged", ex, false); } }
private void LoadLabResult(ref trn_patient_regi _patient_regis) { trn_patient_regi objPatient = _patient_regis; trn_carotid_hdr objTCH = bsCarotidHDR.OfType <trn_carotid_hdr>().FirstOrDefault(); using (InhCheckupDataContext dbc = new InhCheckupDataContext()) { string en = objPatient.tpr_en_no; string hn = objPatient.trn_patient.tpt_hn_no; var objotherxray = (from t1 in dbc.trn_other_xrays where t1.tox_en_no == en && t1.trn_patient_regi.trn_patient.tpt_hn_no == hn && t1.tox_room_type == "CD" select t1).FirstOrDefault(); if (objotherxray != null) { txtpatientOrderResult.Text = objTCH.tch_patient_result == null ? objotherxray.tox_result : objTCH.tch_patient_result; txtComment.Text = objTCH.tch_patient_comt == null ? objotherxray.tox_patient_comt : objTCH.tch_patient_comt; txtResult.Text = objTCH.tch_result == null ? objotherxray.tox_order_name : objTCH.tch_result; txtRequestDate.Text = objTCH.tch_request_date == null?objotherxray.tox_order_date.Value.ToShortDateString() : objTCH.tch_request_date.Value.ToShortDateString(); //request_date = Convert.ToDateTime(objotherxray.tox_order_date.Value.ToShortDateString()); //report_date = Convert.ToDateTime(objotherxray.tox_result_date.Value.ToShortDateString()); txtReportDateTime.Text = objTCH.tch_report_date == null?objotherxray.tox_result_date.Value.ToShortDateString() : objTCH.tch_report_date.Value.ToShortDateString(); } } }
public void EndEdit() { try { trn_carotid_hdr patientTCH = _PatientRegis.trn_carotid_hdrs.FirstOrDefault(); SaveLimeStone(ref patientTCH); } catch { } }
private void SaveLimeStone(ref trn_carotid_hdr _patientTCH) { try { _patientTCH.tch_wall_right_ica = SumString(txt_tch_wall_right_ica1.Text, txt_tch_wall_right_ica2.Text, txt_tch_wall_right_ica3.Text); _patientTCH.tch_wall_right_eca = SumString(txt_tch_wall_right_eca1.Text, txt_tch_wall_right_eca2.Text, txt_tch_wall_right_eca3.Text); _patientTCH.tch_wall_right_cca = SumString(txt_tch_wall_right_cca1.Text, txt_tch_wall_right_cca2.Text, txt_tch_wall_right_cca3.Text); _patientTCH.tch_wall_right_va = SumString(txt_tch_wall_right_va1.Text, txt_tch_wall_right_va2.Text, txt_tch_wall_right_va3.Text); _patientTCH.tch_wall_left_ica = SumString(txt_tch_wall_left_ica1.Text, txt_tch_wall_left_ica2.Text, txt_tch_wall_left_ica3.Text); _patientTCH.tch_wall_left_eca = SumString(txt_tch_wall_left_eca1.Text, txt_tch_wall_left_eca2.Text, txt_tch_wall_left_eca3.Text); _patientTCH.tch_wall_left_cca = SumString(txt_tch_wall_left_cca1.Text, txt_tch_wall_left_cca2.Text, txt_tch_wall_left_cca3.Text); _patientTCH.tch_wall_left_va = SumString(txt_tch_wall_left_va1.Text, txt_tch_wall_left_va2.Text, txt_tch_wall_left_va3.Text); } catch { } }
//WallLimeStone private void LoadDataLimeStone(ref trn_carotid_hdr _patientTCH) { try { SubString(_patientTCH.tch_wall_right_ica, txt_tch_wall_right_ica1, txt_tch_wall_right_ica2, txt_tch_wall_right_ica3); SubString(_patientTCH.tch_wall_right_eca, txt_tch_wall_right_eca1, txt_tch_wall_right_eca2, txt_tch_wall_right_eca3); SubString(_patientTCH.tch_wall_right_cca, txt_tch_wall_right_cca1, txt_tch_wall_right_cca2, txt_tch_wall_right_cca3); SubString(_patientTCH.tch_wall_right_va, txt_tch_wall_right_va1, txt_tch_wall_right_va2, txt_tch_wall_right_va3); SubString(_patientTCH.tch_wall_left_ica, txt_tch_wall_left_ica1, txt_tch_wall_left_ica2, txt_tch_wall_left_ica3); SubString(_patientTCH.tch_wall_left_eca, txt_tch_wall_left_eca1, txt_tch_wall_left_eca2, txt_tch_wall_left_eca3); SubString(_patientTCH.tch_wall_left_cca, txt_tch_wall_left_cca1, txt_tch_wall_left_cca2, txt_tch_wall_left_cca3); SubString(_patientTCH.tch_wall_left_va, txt_tch_wall_left_va1, txt_tch_wall_left_va2, txt_tch_wall_left_va3); } catch { } }