Exemplo n.º 1
0
        public void Update(NotificationEntity Notification)
        {
            var entity = this._DB.Get(Notification.ID);

            entity.SetEntity(Notification);

            this._DB.Edit(entity);
        }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 public void Update(int ID, NotificationEntity Entity)
 {
     Entity.ID = ID;
     this._INotificationService.Update(Entity);
 }