示例#1
0
        public static WebSecurityAddInCollection CreateWebSecurityAddInCollection(WebSecurityAddInData addIns, StateBag viewStateContext, string languageCode)
        {
            WebSecurityAddInCollection ins = new WebSecurityAddInCollection();

            foreach (WebSecurityAddInData.WebSecurityAddInsRow row in addIns.WebSecurityAddIns)
            {
                ins.Add(Create(row, viewStateContext, languageCode));
            }
            return(ins);
        }
示例#2
0
        /// <summary>
        /// Get all security addins available for the survey
        /// </summary>
        public WebSecurityAddInData GetWebSecurityAddIns(int surveyId)
        {
            WebSecurityAddInData dataSet = new WebSecurityAddInData();

            ArrayList commandParameters = new ArrayList();

            {
                commandParameters.Add(new SqlParameter("@surveyid", surveyId).SqlValue);
            }

            DbConnection.db.LoadDataSet("vts_spWebSecurityAddInsGetAll", dataSet, new string[] { "WebSecurityAddIns" }, commandParameters.ToArray());
            return(dataSet);
        }
示例#3
0
        /// <summary>
        /// Return a AddIn object that reflects the database addin data
        /// </summary>
        /// <param name="addInId">Id of the addin you need</param>
        /// <returns>A WebSecurityAddInData object with the current database values</returns>
        public WebSecurityAddInData GetSurveyAddInById(int surveyId, int addInId)
        {
            //SqlParameter[] commandParameters = new SqlParameter[]
            //{ new SqlParameter("@surveyid", surveyId),
            //    new SqlParameter("@addInId", addInId) };

            ArrayList commandParameters = new ArrayList();
            {
                commandParameters.Add(new SqlParameter("@surveyid", surveyId).SqlValue);
                commandParameters.Add(new SqlParameter("@addInId", addInId).SqlValue);
            }

            WebSecurityAddInData dataSet = new WebSecurityAddInData();

            DbConnection.db.LoadDataSet("vts_spWebSecurityAddInsSurveyGetDetails", dataSet, new string[] { "WebSecurityAddIns" }, commandParameters.ToArray());
            return(dataSet);
        }