public void AskForLeaveRelationUserId(Guid instanceID) { var model = _repository.Get(instanceID); if (model.Status == -1 && model.RelationUserId.HasValue) { var input = new CreateRoleRelationInput() { UserId = model.UserId, RelationUserId = model.RelationUserId.Value, StartTime = model.BeginTime, Type = RelationType.AskForLeave, RelationId = model.Id, EndTime = model.EndTime }; _roleRelationManager.Create(input); } }
public void WorkoutRelationUserId(Guid instanceID) { var model = _oaWorkoutRepository.Get(instanceID); if (model.Status == -1 && model.RelationUserId.HasValue) { var input = new CreateRoleRelationInput() { UserId = model.CreatorUserId.Value, RelationUserId = model.RelationUserId.Value, StartTime = model.StartTime.Value, Type = RelationType.Workout, RelationId = model.Id, EndTime = model.EndTime.Value }; _roleRelationManager.Create(input); } }