Exemplo n.º 1
0
        public void SaveDutyDanger(string id, DutyDangerEntity entity)
        {
            var entity1 = this.GetDutyDangerEntity(id);

            if (entity1 == null)
            {
                new Repository <DutyDangerEntity>(DbFactory.Base()).Insert(entity);
            }
            else
            {
                entity1.Danger               = entity.Danger;
                entity1.Measure              = entity.Measure;
                entity1.ReviseDate           = entity.ReviseDate;
                entity1.ReviseUserId         = entity.ReviseUserId;
                entity1.ReviseUserName       = entity.ReviseUserName;
                entity1.DangerReviseDate     = entity.DangerReviseDate;
                entity1.DangerReviseUserId   = entity.DangerReviseUserId;
                entity1.DangerReviseUserName = entity.DangerReviseUserName;
                entity1.DutyContent          = entity.DutyContent;
                new Repository <DutyDangerEntity>(DbFactory.Base()).Update(entity1);
            }
        }
Exemplo n.º 2
0
 public void SaveDutyDanger(string id, DutyDangerEntity entity)
 {
     service.SaveDutyDanger(id, entity);
 }