Ejemplo n.º 1
0
        // OPT00020100219
        // Obtenir toutes les Questions d'un Questionnaire
        public static PollQuestionCollection GetByQuestionnaireID(int questionnaireID)
        {
            DataSet      ds    = new DataSet();
            SqlParameter param = new SqlParameter();

            param       = new SqlParameter("@QuestionnaireID", SqlDbType.Int, 4);
            param.Value = questionnaireID;

            ds = SqlDataProvider.ExecuteDataset
                 (
                Tools.DatabaseConnectionString,
                CommandType.StoredProcedure,
                "GetPollQuestionByQuestionnaireID",
                param
                 );

            PollQuestionCollection oc = new PollQuestionCollection();

            foreach (DataRow r in ds.Tables[0].Rows)
            {
                PollQuestion o = PollQuestion.Fill(r);
                oc.Add(o);
            }
            return(oc);
        }
Ejemplo n.º 2
0
        public static PollQuestionCollection GetAll()
        {
            DataSet ds = new DataSet();

            ds = SqlDataProvider.ExecuteDataset
                 (
                Tools.DatabaseConnectionString,
                CommandType.StoredProcedure,
                "GetPollQuestionAll"
                 );

            PollQuestionCollection oc = new PollQuestionCollection();

            foreach (DataRow r in ds.Tables[0].Rows)
            {
                PollQuestion o = PollQuestion.Fill(r);
                oc.Add(o);
            }
            return(oc);
        }