Ejemplo n.º 1
0
        private void LoadDiagnosis()
        {
            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.GetTop5Diagnosis(HN_No);
                    var       objDiagnosis = (from DataRow t2 in Dt.Rows select t2).OrderByDescending(c => c.Field <DateTime>("MRDIA_Date")).ToList();
                    for (int i = 0; i < objDiagnosis.Count; i++)
                    {
                        GvDiagnosis.Rows.Add(i + 1, String.Format("{0:dd/MM/yyyy}", objDiagnosis[i]["MRDIA_Date"]), objDiagnosis[i]["MRCID_Code"].ToString(), objDiagnosis[i]["MRCID_Desc"].ToString(), objDiagnosis[i]["DTYP_Desc"].ToString(), objDiagnosis[i]["SSUSR_Name"].ToString());
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void LoadDiagnosis(string hn)
        {
            if (hn != String.Empty)
            {
                using (Service.WS_TrakcareCls ws = new Service.WS_TrakcareCls())
                {
                    string HN_No = hn;

                    DataTable Dt           = ws.GetTop5Diagnosis(HN_No);
                    var       objDiagnosis = (from DataRow t2 in Dt.Rows select t2).OrderByDescending(c => c.Field <DateTime>("MRDIA_Date")).ToList();
                    for (int i = 0; i < objDiagnosis.Count; i++)
                    {
                        GvDiagnosis.Rows.Add(i + 1, objDiagnosis[i]["MRDIA_Date"], objDiagnosis[i]["MRCID_Code"].ToString(), objDiagnosis[i]["MRCID_Desc"].ToString(), objDiagnosis[i]["DTYP_Desc"].ToString(), objDiagnosis[i]["SSUSR_Name"].ToString());
                    }
                }
            }
        }