private void InitPatientInfo() { DataTable dt = m_SqlManger.GetPatientInfo(m_NoOfInpat); if (dt.Rows.Count > 0) { barButtonItemAge.Caption = dt.Rows[0]["agestr"].ToString(); barButtonItemBedNo.Caption = dt.Rows[0]["outbed"].ToString(); barButtonItemAdmitTime.Caption = dt.Rows[0]["admitdate"].ToString(); barButtonItemName.Caption = dt.Rows[0]["name"].ToString(); barButtonItemGender.Caption = dt.Rows[0]["gender"].ToString(); barButtonItemPatID.Caption = dt.Rows[0]["patid"].ToString(); } }