Esempio n. 1
0
        // /////////////////////////////////////////////////////////////////////
        // Constructors ////////////////////////////////////////////////////////
        // /////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Default Constructor.
        /// Creates a new comment filling all the fields with empty values.
        /// </summary>
        public MessageBE()
        {
            this.messageDAC = new MessageDAC();

            this.read = false;
            this.delAddressee = false;
            this.delSender = false;
            this.Sender = null;
            this.Addressee = null;
            this.Subject = "";
            this.Message = "";
        }
Esempio n. 2
0
        /// <summary>
        /// Auxiliary Constructor.
        /// Creates a new commet filling all the fields with the specified values.
        /// </summary>
        /// <param name="sender">The user who sends the message.</param>
        /// <param name="addressee">The user who will receive the message.</param>
        /// <param name="date">The date when the message is sent.</param>
        /// <param name="subject">The message subject.</param>
        /// <param name="message">The message body.</param>
        public MessageBE(UserBE sender, UserBE addressee, DateTime date,
            string subject, string message)
        {
            this.messageDAC = new MessageDAC();

            this.read = false;
            this.delAddressee = false;
            this.delSender = false;
            this.Sender = sender;
            this.Addressee = addressee;
            this.Date = date;
            this.Subject = subject;
            this.Message = message;
        }
Esempio n. 3
0
 /// <summary>
 /// Message opened.
 /// This method opens a message. When it is open we can read it
 /// and its state changes.
 /// </summary>
 public void openMessage()
 {
     if (!this.Read)
     {
         MessageDAC aux = new MessageDAC();
         Read = aux.readMessage(this);
     }
 }