Ejemplo n.º 1
0
    private void bindpro_diagnosis()
    {
        DataSet       ds        = new DataSet();
        StringBuilder htmlTable = new StringBuilder();

        ds = objb.getdiagnosis_provisional_byopdcode(Session["opd_code"].ToString());
        htmlTable.Append("<table style='width:100%' border=1px>");
        htmlTable.Append("<tr ><th>Provisional Diagnosis</th><th>Remark</th></tr>");

        if (!object.Equals(ds.Tables[0], null))
        {
            if (ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    htmlTable.Append("<tr>");
                    htmlTable.Append("<td align='center'>" + ds.Tables[0].Rows[i]["pro_diagnosis"] + "</td>");
                    htmlTable.Append("<td align='center'>" + ds.Tables[0].Rows[i]["pro_remark"] + "</td>");

                    htmlTable.Append("</tr>");
                }
                htmlTable.Append("</table>");
                PlaceHolder3.Controls.Add(new Literal {
                    Text = htmlTable.ToString()
                });
            }
            else
            {
                htmlTable.Append("<tr>");
                htmlTable.Append("<td align='center' colspan='4'>There is no Record.</td>");
                htmlTable.Append("</tr>");
            }
        }
    }