Inheritance: System.Data.Objects.DataClasses.EntityObject
Example #1
0
        public void createRankingResponse(int userid, int answerid, int sessionid, int preferencenumber)
        {
            try
            {
                RESPONS response = new RESPONS();

                response.FEEDBACK = new answerModel().getFeedback(answerid);
                response.RESPONSE_ID = getMaxResponseID() + 1;
                response.USER_ID = userid;
                response.ANSWER_ID = answerid;
                response.CREATED_AT = DateTime.Now;
                response.MODIFIED_AT = null;
                response.SESSION_ID = sessionid;
                response.PREFERENCE_NUMBER = preferencenumber;

                dbpollContext.AddToRESPONSES(response);
                dbpollContext.SaveChanges();

            }
            catch (Exception e)
            {
                throw (e);
            }
        }
Example #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the RESPONSES EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToRESPONSES(RESPONS rESPONS)
 {
     base.AddObject("RESPONSES", rESPONS);
 }
Example #3
0
        public void createShortAnswerResponse(String feedback, int userid, int sessionid, int questionid)
        {
            try
            {
                RESPONS response = new RESPONS();

                response.FEEDBACK = feedback;
                response.RESPONSE_ID = getMaxResponseID() + 1;
                response.USER_ID = userid;
                response.CREATED_AT = DateTime.Now;
                response.MODIFIED_AT = null;
                response.SESSION_ID = sessionid;
                response.QUESTION_ID = questionid;

                dbpollContext.AddToRESPONSES(response);
                dbpollContext.SaveChanges();

            }
            catch (Exception e)
            {
                throw (e);
            }
        }
Example #4
0
 /// <summary>
 /// Create a new RESPONS object.
 /// </summary>
 /// <param name="rESPONSE_ID">Initial value of the RESPONSE_ID property.</param>
 /// <param name="fEEDBACK">Initial value of the FEEDBACK property.</param>
 /// <param name="cREATED_AT">Initial value of the CREATED_AT property.</param>
 /// <param name="uSER_ID">Initial value of the USER_ID property.</param>
 /// <param name="sESSION_ID">Initial value of the SESSION_ID property.</param>
 public static RESPONS CreateRESPONS(global::System.Int32 rESPONSE_ID, global::System.String fEEDBACK, global::System.DateTime cREATED_AT, global::System.Int32 uSER_ID, global::System.Int32 sESSION_ID)
 {
     RESPONS rESPONS = new RESPONS();
     rESPONS.RESPONSE_ID = rESPONSE_ID;
     rESPONS.FEEDBACK = fEEDBACK;
     rESPONS.CREATED_AT = cREATED_AT;
     rESPONS.USER_ID = uSER_ID;
     rESPONS.SESSION_ID = sESSION_ID;
     return rESPONS;
 }