private void FillData() { Referral referral = Referrals.GetReferral(RefAttachCur.ReferralNum); textName.Text = referral.GetNameFL(); labelPatient.Visible = referral.PatNum > 0; textReferralNotes.Text = referral.Note; if (RefAttachCur.IsFrom) { listFromTo.SelectedIndex = 0; } else { listFromTo.SelectedIndex = 1; } if (RefAttachCur.RefDate.Year < 1880) { textRefDate.Text = ""; } else { textRefDate.Text = RefAttachCur.RefDate.ToShortDateString(); } textOrder.Text = RefAttachCur.ItemOrder.ToString(); comboRefToStatus.Items.Clear(); for (int i = 0; i < Enum.GetNames(typeof(ReferralToStatus)).Length; i++) { comboRefToStatus.Items.Add(Lan.g("enumReferralToStatus", Enum.GetNames(typeof(ReferralToStatus))[i])); if ((int)RefAttachCur.RefToStatus == i) { comboRefToStatus.SelectedIndex = i; } } textNote.Text = RefAttachCur.Note; checkIsTransitionOfCare.Checked = RefAttachCur.IsTransitionOfCare; textProc.Text = ""; if (RefAttachCur.ProcNum != 0) { Procedure proc = Procedures.GetOneProc(RefAttachCur.ProcNum, false); textProc.Text = Procedures.GetDescription(proc); } if (RefAttachCur.DateProcComplete.Year < 1880) { textDateProcCompleted.Text = ""; } else { textDateProcCompleted.Text = RefAttachCur.DateProcComplete.ToShortDateString(); } }
private void FillData() { Referral referral = ReferralL.GetReferral(RefAttachCur.ReferralNum); if (referral == null) { return; } textName.Text = referral.GetNameFL(); labelPatient.Visible = referral.PatNum > 0; textReferralNotes.Text = referral.Note; listRefType.SelectedIndex = (int)RefAttachCur.RefType; if (RefAttachCur.RefDate.Year < 1880) { textRefDate.Text = ""; } else { textRefDate.Text = RefAttachCur.RefDate.ToShortDateString(); } textOrder.Text = RefAttachCur.ItemOrder.ToString(); textOrder.ReadOnly = true; //It can be reordered by the Up/Down buttons on FormReferralsPatient. comboRefToStatus.Items.Clear(); for (int i = 0; i < Enum.GetNames(typeof(ReferralToStatus)).Length; i++) { comboRefToStatus.Items.Add(Lan.g("enumReferralToStatus", Enum.GetNames(typeof(ReferralToStatus))[i])); if ((int)RefAttachCur.RefToStatus == i) { comboRefToStatus.SelectedIndex = i; } } textNote.Text = RefAttachCur.Note; checkIsTransitionOfCare.Checked = RefAttachCur.IsTransitionOfCare; textProc.Text = ""; if (RefAttachCur.ProcNum != 0) { Procedure proc = Procedures.GetOneProc(RefAttachCur.ProcNum, false); textProc.Text = Procedures.GetDescription(proc); } if (RefAttachCur.DateProcComplete.Year < 1880) { textDateProcCompleted.Text = ""; } else { textDateProcCompleted.Text = RefAttachCur.DateProcComplete.ToShortDateString(); } }