public override DataSet Clone() { WebSecurityAddInData data = (WebSecurityAddInData)base.Clone(); data.InitVars(); return(data); }
public static IWebSecurityAddIn Create(WebSecurityAddInData.WebSecurityAddInsRow addIn, StateBag viewStateContext, string languageCode) { IWebSecurityAddIn @in = null; try { if (addIn.TypeAssembly == null) { throw new InvalidCastException(); } @in = (IWebSecurityAddIn) Assembly.Load(addIn.TypeAssembly).CreateInstance(addIn.TypeNameSpace); @in.AddInDbId = addIn.WebSecurityAddInId; @in.Disabled = addIn.Disabled; string str = ResourceManager.GetString(addIn.Description); @in.Description = (str == null) ? addIn.Description : str; @in.SurveyId = addIn.SurveyID; @in.ViewState = viewStateContext; @in.Order = addIn.AddInOrder; @in.LanguageCode = languageCode; /// return @in; } catch (NullReferenceException) { throw new InvalidCastException("specfied type " + addIn.TypeNameSpace + " could not be found in the specifed assembly " + addIn.TypeAssembly); } catch (InvalidCastException) { throw new InvalidCastException("specfied type " + addIn.TypeNameSpace + " must implement the IWebSecurityAddIn interface"); } return @in; }
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; }
public WebSecurityAddInsRowChangeEvent(WebSecurityAddInData.WebSecurityAddInsRow row, DataRowAction action) { this.eventRow = row; this.eventAction = action; }
public void RemoveWebSecurityAddInsRow(WebSecurityAddInData.WebSecurityAddInsRow row) { base.Rows.Remove(row); }
public void AddWebSecurityAddInsRow(WebSecurityAddInData.WebSecurityAddInsRow row) { base.Rows.Add(row); }
/// <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; }