// 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); }
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); }