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