public void Update(NotificationEntity Notification)
        {
            var entity = this._DB.Get(Notification.ID);

            entity.SetEntity(Notification);

            this._DB.Edit(entity);
        }
Exemple #2
0
 public void SetEntity(NotificationEntity Entity)
 {
     this.Title       = Entity.Title;
     this.Info        = Entity.Info;
     this.ReceiveUser = Entity.ReceiveUser;
     this.SendUser    = Entity.SendUser;
     this.EffectDate  = Entity.EffectDate;
     this.InvalidDate = Entity.InvalidDate;
     this.CreateDate  = Entity.CreateDate;
     this.IsDelete    = Entity.IsDelete;
     this.SourceID    = Entity.SourceID;
     this.SourceName  = Entity.SourceName;
     this.SourceTag   = Entity.SourceTag;
     this.IsRead      = Entity.IsRead;
 }
        public int Add(NotificationInfo Notification)
        {
            var entity = new NotificationEntity(Notification);

            entity.IsDelete = false;
            this._DB.Add(entity);

            _NotifySrv.Send(new {
                Target  = Notification.ReceiveUser,
                Head    = Notification.Head,
                Title   = entity.Title,
                Content = entity.Info,
            });

            //foreach (var attachID in Notification.AttachIDs)
            //{
            //    AddAttach(entity.ID, attachID);
            //}

            return(entity.ID);
        }
Exemple #4
0
 public void Update(int ID, NotificationEntity Entity)
 {
     Entity.ID = ID;
     this._INotificationService.Update(Entity);
 }