Example #1
0
        private void loadRecords()
        {
            try
            {
                DataTable dt     = objCD.getMedicalReportFromID(appointment_id);
                DataTable dtProc = objCD.getProceduresFromApptID(appointment_id);

                lblName.Text        = dt.Rows[0]["patient_name"].ToString();
                lblRegNo.Text       = dt.Rows[0]["patient_number"].ToString();
                lblAge.Text         = dt.Rows[0]["age"].ToString();
                lblGender.Text      = Utils.Gender[dt.Rows[0]["gender"].ToString()];
                lblDate.Text        = Utils.FormatDateShort(dt.Rows[0]["appointment_date"].ToString());
                lblAddress.Text     = dt.Rows[0]["address"].ToString();
                lblNationality.Text = dt.Rows[0]["nationality"].ToString();
                lblDescription.Text = dt.Rows[0]["history"].ToString();
                lblDoctor.Text      = dt.Rows[0]["doctor_name"].ToString();
                string proc = "";
                for (int r = 0; r < dtProc.Rows.Count; r++)
                {
                    if (r > 0)
                    {
                        proc += ", ";
                    }

                    proc += dtProc.Rows[r]["name"].ToString();
                }
                lblProcedures.Text = proc;
            }
            catch (Exception ex)
            {
                CommonLogger.Info(ex.ToString());
            }
        }