예제 #1
0
    private string GetSys(string questionSysnumber, string selectOpiton)
    {
        string    returnValue = "";
        DataTable dt          = new DalTestQuestonAnswer().GetList("questionSysnumber='" + questionSysnumber + "'").Tables[0];

        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                if (dt.Rows[i]["AnswerKey"].ToString() == selectOpiton)
                {
                    returnValue = dt.Rows[i]["sysnumber"].ToString();
                }
            }
        }
        return(returnValue);
    }
예제 #2
0
    public string GetOptions(string questionSys, string inputFlag)
    {
        string    html = "";
        DataTable dt   = new DalTestQuestonAnswer().GetList("questionSysnumber='" + questionSys + "' and isnull(AnswerValue,'')<>'' order by orderby").Tables[0];

        html += " <p><input type=\"hidden\"  id=\"" + questionSys + "\" class=\"jquery_options\" />";
        html += "<table onclick=\"getAnswer2('" + questionSys + "','" + inputFlag + "')\">";
        foreach (DataRow row in dt.Rows)
        {
            if (inputFlag == "radio")
            {
                html += "<tr><td><input type='radio' id='" + row["sysnumber"] + "' name='radio-" + questionSys + "' value='" + row["AnswerKey"] + "' /><label for='" + row["sysnumber"] + "'>" + row["AnswerKey"] + " " + row["AnswerValue"] + "</label></td></tr>";
            }
            else
            {
                html += "<tr><td><input type='checkbox' id='" + row["sysnumber"] + "' name='checkbox-" + questionSys + "' value='" + row["AnswerKey"] + "' /><label for='" + row["sysnumber"] + "'>" + row["AnswerKey"] + " " + row["AnswerValue"] + "</label></td></tr>";
            }
        }
        html += "</table>";
        return(html);
    }
예제 #3
0
    private DataTable BindSelection(string questionSys)
    {
        DataTable dt = new DalTestQuestonAnswer().GetList("questionSysnumber='" + questionSys + "' order by orderby").Tables[0];

        return(dt);
    }