/// <summary> /// Deprecated Method for adding a new object to the QUESTIONS EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToQUESTIONS(QUESTION qUESTION) { base.AddObject("QUESTIONS", qUESTION); }
public void createQuestion(int questiontype, String question, int chartstyle, int questnum, int pollid) { try { QUESTION create = new QUESTION(); create.QUESTION_ID = getMaxID() + 1; create.QUESTION_TYPE = questiontype; create.NUM = questnum; create.QUESTION1 = question; create.CHART_STYLE = chartstyle; create.CREATED_AT = DateTime.Now; create.MODIFIED_AT = DateTime.Now; create.POLL_ID = pollid; dbpollContext.AddToQUESTIONS(create); dbpollContext.SaveChanges(); } catch (Exception e) { throw (e); } }
/// <summary> /// Create a new QUESTION object. /// </summary> /// <param name="qUESTION_ID">Initial value of the QUESTION_ID property.</param> /// <param name="qUESTION_TYPE">Initial value of the QUESTION_TYPE property.</param> /// <param name="qUESTION1">Initial value of the QUESTION1 property.</param> /// <param name="cREATED_AT">Initial value of the CREATED_AT property.</param> /// <param name="pOLL_ID">Initial value of the POLL_ID property.</param> /// <param name="qUESTION_OPEN">Initial value of the QUESTION_OPEN property.</param> /// <param name="nEXT_QUESTION">Initial value of the NEXT_QUESTION property.</param> public static QUESTION CreateQUESTION(global::System.Int32 qUESTION_ID, global::System.Int32 qUESTION_TYPE, global::System.String qUESTION1, global::System.DateTime cREATED_AT, global::System.Int32 pOLL_ID, global::System.Int32 qUESTION_OPEN, global::System.Int32 nEXT_QUESTION) { QUESTION qUESTION = new QUESTION(); qUESTION.QUESTION_ID = qUESTION_ID; qUESTION.QUESTION_TYPE = qUESTION_TYPE; qUESTION.QUESTION1 = qUESTION1; qUESTION.CREATED_AT = cREATED_AT; qUESTION.POLL_ID = pOLL_ID; qUESTION.QUESTION_OPEN = qUESTION_OPEN; qUESTION.NEXT_QUESTION = nEXT_QUESTION; return qUESTION; }