コード例 #1
0
        public override DataSet Clone()
        {
            PageOptionData data = (PageOptionData)base.Clone();

            data.InitVars();
            return(data);
        }
コード例 #2
0
 /// <summary>
 /// Update the options that were setup for the page
 /// </summary>
 public void UpdateSurveyPageOptions(PageOptionData updatedPageOptions)
 {
     SurveyFactory.Create().UpdateSurveyPageOptions(updatedPageOptions);
 }
		private void EnableSubmitHyperlink_Click(object sender, System.EventArgs e)
		{
			PageOptionData updatedPageOptions = new PageOptionData();
			PageOptionData.PageOptionsRow pageOption = updatedPageOptions.PageOptions.NewPageOptionsRow();
			pageOption.SurveyId = SurveyId;
			pageOption.PageNumber = PageNumber;
			pageOption.RandomizeQuestions = _enableRandomize;
			pageOption.EnableSubmitButton = !_enableSubmit;

			updatedPageOptions.PageOptions.Rows.Add(pageOption);
			new Survey().UpdateSurveyPageOptions(updatedPageOptions);

			// Reloads the builder
			UINavigator.NavigateToSurveyBuilder(SurveyId, ((PageBase)Page).MenuIndex);
		
		}
コード例 #4
0
 /// <summary>
 /// Update the options that were setup for the page
 /// </summary>
 public void UpdateSurveyPageOptions(PageOptionData updatedPageOptions)
 {
     SqlConnection dbConnection = new SqlConnection(DbConnection.NewDbConnectionString);
     SqlCommand updatePageOptions = new SqlCommand("vts_spPageOptionUpdate", dbConnection);
     updatePageOptions.CommandType = CommandType.StoredProcedure;
     updatePageOptions.Parameters.Add("@SurveyID", SqlDbType.Int, 4, "SurveyID");
     updatePageOptions.Parameters.Add("@PageNumber", SqlDbType.Int, 4, "PageNumber");
     updatePageOptions.Parameters.Add("@RandomizeQuestions", SqlDbType.Bit, 1, "RandomizeQuestions");
     updatePageOptions.Parameters.Add("@EnableSubmitButton", SqlDbType.Bit, 1, "EnableSubmitButton");
   DbConnection.db.UpdateDataSet(updatedPageOptions, "PageOptions", updatePageOptions, new SqlCommand(), updatePageOptions, UpdateBehavior.Transactional);
 }
コード例 #5
0
        /// <summary>
        /// Retrieves the options that were setup for the page
        /// </summary>
        public PageOptionData GetSurveyPageOptions(int surveyId, int pageNumber)
        {
            PageOptionData pageOptions = new PageOptionData();

            //SqlParameter[] spParameters = new SqlParameter[2];
            //spParameters[0] = new SqlParameter("@SurveyId", surveyId);
            //spParameters[1] = new SqlParameter("@pageNumber", pageNumber);

            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@SurveyId", surveyId).SqlValue);
                sqlParams.Add(new SqlParameter("@pageNumber", pageNumber).SqlValue);
            }

            DbConnection.db.LoadDataSet("vts_spPageOptionGetDetails", pageOptions, new string[] { "PageOptions" }, sqlParams.ToArray());
            return pageOptions;
        }
コード例 #6
0
 public PageOptionsRowChangeEvent(PageOptionData.PageOptionsRow row, DataRowAction action)
 {
     this.eventRow = row;
     this.eventAction = action;
 }
コード例 #7
0
 public void RemovePageOptionsRow(PageOptionData.PageOptionsRow row)
 {
     base.Rows.Remove(row);
 }
コード例 #8
0
 public void AddPageOptionsRow(PageOptionData.PageOptionsRow row)
 {
     base.Rows.Add(row);
 }