public static SubjectMessage MapTo(Subject model)
        {
            SubjectMessage response = new SubjectMessage();

            response.Id          = model.Id;
            response.Title       = model.Title;
            response.Description = model.Description;

            return(response);
        }
示例#2
0
        // Toevoegen van een SubjectMessage adhv een 'Message' en een 'Hashtag'
        public void AddSubjectMessage(Message msg, Hashtag hashtag)
        {
            initNonExistingRepo();

            SubjectMessage subjMess = new SubjectMessage()
            {
                Msg     = msg,
                Hashtag = hashtag
            };

            repo.AddSubjectMsg(subjMess);
        }
示例#3
0
        // Toevoegen van een SubjectMessage adhv een 'Message' en een 'Persoon'
        public void AddSubjectMessage(Message msg, Persoon persoon)
        {
            initNonExistingRepo();

            SubjectMessage subjMess = new SubjectMessage()
            {
                Msg     = msg,
                Persoon = persoon
            };

            repo.AddSubjectMsg(subjMess);
        }
示例#4
0
        /// <summary>
        /// Called by this class and childs when they want to update the listView (console log)
        /// </summary>
        /// <param name="Type"> Type of message (success or warning or etc ...) that you want to send </param>
        /// <param name="Subject"> Subject of the message (addArticle, addFamille) </param>
        /// <param name="Message"> The message to send </param>
        protected void UpdateListView(TypeMessage Type, SubjectMessage Subject, string Message)
        {
            ArgsEvent.Message = Message;
            ArgsEvent.Subject = Subject;
            ArgsEvent.Type    = Type;

            CounterTypeMessage[Type] += 1; // Increment the counter

            if (EventUpdateListView != null)
            {
                EventUpdateListView(this, ArgsEvent); // Send the event
            }
        }
示例#5
0
 public void AddSubjectMsg(SubjectMessage subjMsg)
 {
     ctx.SubjectMessages.Add(subjMsg);
     ctx.SaveChanges();
 }
示例#6
0
 public OperationResponse <SubjectMessage> Update(SubjectMessage subject)
 {
     throw new NotImplementedException();
 }