private void getConsultationDetails() { try { DataTable dt = objCD.getRecordFromID(appoint_id); lblRegNo.Text = dt.Rows[0]["patient_number"].ToString(); lblName.Text = dt.Rows[0]["patient_name"].ToString(); lblGender.Text = Utils.Gender[dt.Rows[0]["gender"].ToString()]; lblAge.Text = dt.Rows[0]["age"].ToString(); lblDoctor.Text = Utils.FormatDoctorName(dt.Rows[0]["doctor_name"].ToString()); lblDate.Text = Utils.FormatDateShort(DateTime.Today.ToString()); dgvMedicine.AutoGenerateColumns = false; dgvMedicine.DataSource = objMed.getMedicinesFromApptID(appoint_id); string med = ""; foreach (DataGridViewRow row in dgvMedicine.Rows) { med += row.Cells["med_name"].Value + " " + row.Cells["med_prescription"].Value + "\r\n"; } lblMedicine.Text = med; } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void getMedicineList() { try { dgvMedicine.DataSource = objMed.getMedicinesFromApptID(Convert.ToInt32(txtAppID.Text)); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void getConsultationDetails() { try { DataTable dt = objCD.getRecordFromID(appoint_id); lblRegNo.Text = dt.Rows[0]["patient_number"].ToString(); lblName.Text = dt.Rows[0]["patient_name"].ToString(); lblGender.Text = Utils.Gender[dt.Rows[0]["gender"].ToString()]; lblMobileNo.Text = dt.Rows[0]["phone"].ToString(); lblDoctor.Text = Utils.FormatDoctorName(dt.Rows[0]["doctor_name"].ToString()); lblDate.Text = Utils.FormatDateShort(DateTime.Today.ToString()); dgvMedicine.AutoGenerateColumns = false; dgvMedicine.DataSource = objMed.getMedicinesFromApptID(appoint_id); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }