/// <summary> /// Create a new SurveyQuestion object. /// </summary> /// <param name="questionID">Initial value of the QuestionID property.</param> /// <param name="portalID">Initial value of the PortalID property.</param> /// <param name="displayOrder">Initial value of the DisplayOrder property.</param> /// <param name="surveyID">Initial value of the SurveyID property.</param> /// <param name="answerGroupID">Initial value of the AnswerGroupID property.</param> /// <param name="question">Initial value of the Question property.</param> /// <param name="isDeleted">Initial value of the IsDeleted property.</param> public static SurveyQuestion CreateSurveyQuestion(global::System.Int32 questionID, global::System.Int32 portalID, global::System.Int32 displayOrder, global::System.Int32 surveyID, global::System.Int32 answerGroupID, global::System.String question, global::System.Boolean isDeleted) { SurveyQuestion surveyQuestion = new SurveyQuestion(); surveyQuestion.QuestionID = questionID; surveyQuestion.PortalID = portalID; surveyQuestion.DisplayOrder = displayOrder; surveyQuestion.SurveyID = surveyID; surveyQuestion.AnswerGroupID = answerGroupID; surveyQuestion.Question = question; surveyQuestion.IsDeleted = isDeleted; return surveyQuestion; }
public static void Insert(Hashtable values) { DAL.SurveyQuestion Record = new DAL.SurveyQuestion { Question = values["Question"].ToString(), AnswerGroupID = int.Parse(values["AnswerGroupID"].ToString()), SurveyID = int.Parse(values["SurveyID"].ToString()), DisplayOrder = GetMaxDisplayOrder() + 1, IsDeleted = bool.Parse(values["IsDeleted"].ToString()), PortalID = Questions.PortalID }; Utils.DbContext.AddToSurveyQuestions(Record); Utils.DbContext.SaveChanges(); }
/// <summary> /// Deprecated Method for adding a new object to the SurveyQuestions EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToSurveyQuestions(SurveyQuestion surveyQuestion) { base.AddObject("SurveyQuestions", surveyQuestion); }