Esempio n. 1
0
    private void SearchGroups()
    {
        List<QuestionGroup> qGroups = new List<QuestionGroup>();
        QuestionGroupList qGroupList = new QuestionGroupList();

        qGroups = qGroupList.GetQuestionGroups(Server.HtmlEncode(tbSearchQGroups.Text), cbQGroupStatus.Checked == true ? 'A' : 'I',Master.CurrentUser.UserID);

        lvQuestionGroups.DataSource = qGroups;
        lvQuestionGroups.DataBind();
    }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.PageHeader = "Search Questions";
        if (!IsPostBack)
        {
            List<QuestionGroup> lst = new List<QuestionGroup>();
            QuestionGroupList obj = new QuestionGroupList();
            lst = obj.GetQuestionGroups("", 'A',Master.CurrentUser.UserID);
            ddlQuestionGroup.DataSource = lst;
            ddlQuestionGroup.DataTextField = "Name";
            ddlQuestionGroup.DataValueField = "ID";
            ddlQuestionGroup.DataBind();
            ddlQuestionGroup.Items.Insert(0, new ListItem("-- Select One --", ""));

            QuestionList QList = new QuestionList();
            DataTable dt = QList.GetQResponseTypes();
            ddlResponseType.DataSource = dt;
            ddlResponseType.DataTextField = "Name";
            ddlResponseType.DataValueField = "ID";
            ddlResponseType.DataBind();

            SearchQuestions();
        }
    }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["QuestionId"] != null)
        {
            QuestionId = Convert.ToInt64(Request.QueryString["QuestionId"]);
        }
        if (!IsPostBack)
        {
            List<QuestionGroup> lst = new List<QuestionGroup>();
            QuestionGroupList obj = new QuestionGroupList();
            lst = obj.GetQuestionGroups("",'A',Master.CurrentUser.UserID);
            ddlQuestionGroup.DataSource = lst;
            ddlQuestionGroup.DataTextField = "Name";
            ddlQuestionGroup.DataValueField = "ID";
            ddlQuestionGroup.DataBind();
            ddlQuestionGroup.Items.Insert(0, new ListItem("-- Select One --", ""));

            //load the Response Type dropdown from the Enums
            BindResponseTypes();

            if (QuestionId > 0)
            {
                //Populate the data for the QuestionId
                QuestionList qObj = new QuestionList();
                Question obj1 = qObj.GetQuestionById(QuestionId,1);
                if (obj1 != null)
                {
                    txtQuestionText.Text = obj1.Content;
                    //txtDisplayOrder.Text = obj1.DisplayOrder.ToString();
                    //txtNarrative.Text = obj1.Narrative;
                    txtHelpText.Text = obj1.HelpText;
                    ddlQuestionGroup.SelectedValue = obj1.QGroupId_Ref.ToString();
                    ddlResponseType.SelectedValue = obj1.QResponseTypeId_Ref.ToString();
                    chkMandatory.Checked = obj1.IsMandatory.ToString() == "Y" ? true : false;
                    chkStatus.Checked = obj1.Status.ToString() == "A" ? true : false;
                    LoadOptions(obj1.ResponseText);
                }
                //Session["Questionid"] = QuestionId;
            }
        }
    }
Esempio n. 4
0
 protected void PopulateGroups()
 {
     QuestionGroupList obj = new QuestionGroupList();
     ddlQuestionGroup.DataSource = obj.GetQuestionGroups("",'A',Master.CurrentUser.UserID);
     ddlQuestionGroup.DataTextField = "Name";
     ddlQuestionGroup.DataValueField = "ID";
     ddlQuestionGroup.DataBind();
     ddlQuestionGroup.Items.Insert(0,(new ListItem("-- Select One --","")));
 }