Example #1
0
        public bool DeleteQuestion(short QuestionID)
        {
            Common.ConnectionManagement myconnector = new Common.ConnectionManagement(_connectionstring);
            List <SqlParameter>         procParams  = new List <SqlParameter>();

            procParams.Add(new SqlParameter("QuestionID", QuestionID));
            Common.SQLQueryResult queryRes = myconnector.ExecuteNonQueryProcedure("srvy.DeleteQuestion", procParams, 600);
            _lastSqlException = queryRes.SqlError;
            if (queryRes.SqlError != null)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
Example #2
0
        //-----------------------------------------
        //-------- Answer Table Methods ----------
        //-----------------------------------------
        public bool InsertAnswer(short QuestionID, bool?YesNo, string Description)
        {
            Common.ConnectionManagement myconnector = new Common.ConnectionManagement(_connectionstring);
            List <SqlParameter>         procParams  = new List <SqlParameter>();

            procParams.Add(new SqlParameter("@QuestionID", QuestionID));
            procParams.Add(new SqlParameter("@YesNo", YesNo));
            procParams.Add(new SqlParameter("@Description", Description));
            Common.SQLQueryResult queryRes = myconnector.ExecuteNonQueryProcedure("srvy.InsertAnswer", procParams, 600);
            _lastSqlException = queryRes.SqlError;
            if (queryRes.SqlError != null)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }