private void BindPrescriptionData() { try { List <PrescriptionCourseData> prsc = PrescriptionCourseDataBLL.GetList(); lstCourses.DataSource = prsc; lstCourses.DataBind(); List <PrescriptionCdData> prscCdData = PrescriptionCdDataBLL.GetList(); lstCD.DataSource = prscCdData; lstCD.DataBind(); List <PrescriptionCD> prsCds = PrescriptionCdBLL.GetListByPrescription(prescription.PrescriptionId); List <PrescriptionCourses> prsCourseses = PrescriptionCoursesBLL.GetListByPrescription(prescription.PrescriptionId); foreach (var item in prsCds) { lstCD.Items.FindByText(item.CdName).Selected = true; } foreach (var item in prsCourseses) { lstCourses.Items.FindByText(item.CourseName).Selected = true; } txtFinalReport.Text = prescription.Report; txtComment.Text = prescription.ConfermedComment; } catch (Exception ex) { string message = ex.Message.Replace('\n', ' ') + " for CD's Or Courses."; this.ShowHelperMessage("Warning", message, HelperNotify.NotificationType.info); } }
private void BindPrescriptionData() { try { List <PrescriptionCourseData> prscCourseData = PrescriptionCourseDataBLL.GetList(); lstCourses.DataSource = prscCourseData; lstCourses.DataBind(); List <PrescriptionCdData> prscCdData = PrescriptionCdDataBLL.GetList(); lstCD.DataSource = prscCdData; lstCD.DataBind(); } catch (Exception) { this.ShowHelperMessage("Warning", "Please Fill Course table or CD's table first", HelperNotify.NotificationType.error); } }