Esempio n. 1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the messages EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTomessages(message message)
 {
     base.AddObject("messages", message);
 }
Esempio n. 2
0
 /// <summary>
 /// Create a new message object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="personFromId">Initial value of the PersonFromId property.</param>
 /// <param name="personToId">Initial value of the PersonToId property.</param>
 /// <param name="subject">Initial value of the Subject property.</param>
 /// <param name="text">Initial value of the Text property.</param>
 /// <param name="date">Initial value of the Date property.</param>
 /// <param name="isRead">Initial value of the IsRead property.</param>
 public static message Createmessage(global::System.Int64 id, global::System.Int64 personFromId, global::System.Int64 personToId, global::System.String subject, global::System.String text, global::System.DateTime date, global::System.Boolean isRead)
 {
     message message = new message();
     message.Id = id;
     message.PersonFromId = personFromId;
     message.PersonToId = personToId;
     message.Subject = subject;
     message.Text = text;
     message.Date = date;
     message.IsRead = isRead;
     return message;
 }
Esempio n. 3
0
 public void DeleteMessage(message m)
 {
     CheckConnection();
     try
     {
         lock (locker)
         {
             this.db.DeleteObject(m);
             this.db.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         throw new DBException(ErrorTypes.UnexpectedException, ex);
     }
 }
Esempio n. 4
0
 public ReadMessageWindow(message mess)
 {
     this.Message = mess;
     InitializeComponent();
 }
Esempio n. 5
0
 public void Message_ChangeIsRead(message m)
 {
     CheckConnection();
     try
     {
         lock (locker)
         {
             m.IsRead = true;
             this.db.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         throw new DBException(ErrorTypes.UnexpectedException, ex);
     }
 }