Inheritance: System.Data.Objects.DataClasses.EntityObject
Exemple #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ASSIGNEDPOLLS EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToASSIGNEDPOLLS(ASSIGNEDPOLL aSSIGNEDPOLL)
 {
     base.AddObject("ASSIGNEDPOLLS", aSSIGNEDPOLL);
 }
Exemple #2
0
        /// <summary>
        /// Call to assign a poll to a particualar user.
        /// </summary>
        /// <param name="pollid"></param>
        /// <param name="userid"></param>
        public void assignPoll(int pollid, int[] pollUserId)
        {
            try
            {
                foreach (int id in pollUserId)
            {

                ASSIGNEDPOLL assignment = new ASSIGNEDPOLL();
                assignment.ASSIGNED_ID = getMaxAssignID() + 1;
                assignment.POLL_ID = pollid;
                assignment.USER_ID = id;

                dbpollContext.AddToASSIGNEDPOLLS(assignment);
                dbpollContext.SaveChanges();
                }
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
Exemple #3
0
 /// <summary>
 /// Create a new ASSIGNEDPOLL object.
 /// </summary>
 /// <param name="aSSIGNED_ID">Initial value of the ASSIGNED_ID property.</param>
 public static ASSIGNEDPOLL CreateASSIGNEDPOLL(global::System.Int32 aSSIGNED_ID)
 {
     ASSIGNEDPOLL aSSIGNEDPOLL = new ASSIGNEDPOLL();
     aSSIGNEDPOLL.ASSIGNED_ID = aSSIGNED_ID;
     return aSSIGNEDPOLL;
 }