private void LoadAppointment() { if (Program.CurrentRegis != null) { using (Service.WS_TrakcareCls ws = new Service.WS_TrakcareCls()) { string HN_No = dbc.trn_patients.Where(c => c.tpt_id == Program.CurrentRegis.tpt_id).Single().tpt_hn_no; DataTable Dt = ws.GetAppointmentByHN(HN_No, "N"); for (int i = 0; i < Dt.Rows.Count; i++) { GvAppointment.Rows.Add(i + 1, String.Format("{0:dd/MM/yyyy} {1}", Dt.Rows[i]["AS_Date"], Dt.Rows[i]["AS_SessStartTime"]), Dt.Rows[i]["CTLOC_Desc"].ToString(), Dt.Rows[i]["SER_Desc"].ToString(), Dt.Rows[i]["RES_Desc"].ToString()); } } } }
private void LoadAppointment(string hn) { if (hn != String.Empty) { using (Service.WS_TrakcareCls ws = new Service.WS_TrakcareCls()) { //string HN_No = dbc.trn_patients.Where(c => c.tpt_id == dbc.trn_patients.Where(c => c.tpt_hn_no == hn).Single().tpt_id).Single().tpt_hn_no; DataTable Dt = ws.GetAppointmentByHN(hn, "N"); for (int i = 0; i < Dt.Rows.Count; i++) { GvAppointmentSub.Rows.Add(i + 1, String.Format("{0:dd/MM/yyyy} {1}", Dt.Rows[i]["AS_Date"], Dt.Rows[i]["AS_SessStartTime"]), Dt.Rows[i]["CTLOC_Desc"].ToString(), Dt.Rows[i]["SER_Desc"].ToString(), Dt.Rows[i]["RES_Desc"].ToString()); } } } }