Inheritance: System.Data.Objects.DataClasses.EntityObject
Exemple #1
0
        public void createAnswerHistory(int answerid, String answer, int correct, int weight, int ansnum)
        {
            try
            {
                ANSWER_HISTORY a = new ANSWER_HISTORY();

                a.ANSWERH_ID = getMaxID() + 1;
                a.ANSWER = answer;
                a.CORRECT = correct;
                a.WEIGHT = weight;
                a.NUM = ansnum;
                a.CREATED_AT = DateTime.Now;
                a.MODIFIED_AT = DateTime.Now;
                a.ANSWER_ID = answerid;

                dbpollContext.AddToANSWER_HISTORY(a);
                int status = dbpollContext.SaveChanges();
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
Exemple #2
0
 /// <summary>
 /// Create a new ANSWER_HISTORY object.
 /// </summary>
 /// <param name="aNSWERH_ID">Initial value of the ANSWERH_ID property.</param>
 /// <param name="aNSWER">Initial value of the ANSWER property.</param>
 /// <param name="cREATED_AT">Initial value of the CREATED_AT property.</param>
 public static ANSWER_HISTORY CreateANSWER_HISTORY(global::System.Int32 aNSWERH_ID, global::System.String aNSWER, global::System.DateTime cREATED_AT)
 {
     ANSWER_HISTORY aNSWER_HISTORY = new ANSWER_HISTORY();
     aNSWER_HISTORY.ANSWERH_ID = aNSWERH_ID;
     aNSWER_HISTORY.ANSWER = aNSWER;
     aNSWER_HISTORY.CREATED_AT = cREATED_AT;
     return aNSWER_HISTORY;
 }
Exemple #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ANSWER_HISTORY EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToANSWER_HISTORY(ANSWER_HISTORY aNSWER_HISTORY)
 {
     base.AddObject("ANSWER_HISTORY", aNSWER_HISTORY);
 }