public CreateActionPlanCommand(ICollection <Objective> objective, CoachingProcess coachingProcess, string Description = null) { this.CoachingProcess = new HashSet <CoachingProcess>(); this.CoachingProcess.Add(coachingProcess); this.Objective = objective; this.Description = Description; }
public CreateActionPlanCommand(ICollection<Objective> objective, CoachingProcess coachingProcess, string Description = null) { this.CoachingProcess = new HashSet<CoachingProcess>(); this.CoachingProcess.Add(coachingProcess); this.Objective = objective; this.Description = Description; }
public async Task <IHttpActionResult> HireCoach(string Id) { var db = IlevusDBContext.Create(); var collection = db.GetCoachingProcessCollection(); try { var user = await UserManager.FindByNameAsync(User.Identity.Name); var coach = await UserManager.FindByIdAsync(Id); var process = new CoachingProcess() { CoachId = coach.Id, CoacheeId = user.Id }; process.Steps = coach.Professional.ProcessSteps; await collection.InsertOneAsync(process); return(Ok(process)); } catch (Exception e) { return(InternalServerError(e)); } }
public UpdateActionPlanCommand(Guid id, ICollection <Objective> objective, CoachingProcess coachingProcess, string description = null) { this.Id = id; this.CoachingProcess = new HashSet <CoachingProcess>(); this.CoachingProcess.Add(coachingProcess); this.Objective = objective; this.Description = description; }
public UpdateActionPlanCommand(Guid id, ICollection<Objective> objective, CoachingProcess coachingProcess, string description = null) { this.Id = id; this.CoachingProcess = new HashSet<CoachingProcess>(); this.CoachingProcess.Add(coachingProcess); this.Objective = objective; this.Description = description; }
public static bool CreateCoachingProcessScopeIsValid(this CoachingProcess coachingProcess) { return(AssertionConcern.IsSatisfiedBy( AssertionConcern.AssertArgumentNotNull(coachingProcess.StartDate, Errors.StartDateIsRequired), AssertionConcern.AssertArgumentNotNull(coachingProcess.Mode, Errors.ModeIsRequired), AssertionConcern.AssertArgumentNotNull(coachingProcess.Name, Errors.NameIsRequired) )); }
public CoachingProcess Create(CreateCoachingProcessCommand command) { var coachingProcess = new CoachingProcess(command.Name, command.StartDate, command.Mode, command.Budget, command.Session, command.PerformaceIndicator, command.Coachee, command.Coach, command.Service, command.EndDate, command.Observation); coachingProcess.Validate(); _repository.Create(coachingProcess); if (Commit()) return coachingProcess; return null; }
public CreateSessionCommand(CoachingProcess coachingProcess, string theme, User user, DateTime date, TimeSpan startTime, TimeSpan?endTime, ESessionClassification classification, string observation, ICollection <Job> job) { this.Theme = theme; this.Date = date; this.StartTime = startTime; this.EndTime = endTime; this.Classification = classification; this.CoachingProcess = coachingProcess; this.User = user; this.Observation = observation; this.Job = job; }
public CreateSessionCommand(CoachingProcess coachingProcess, string theme, User user, DateTime date, TimeSpan startTime, TimeSpan? endTime, ESessionClassification classification, string observation, ICollection<Job> job) { this.Theme = theme; this.Date = date; this.StartTime = startTime; this.EndTime = endTime; this.Classification = classification; this.CoachingProcess = coachingProcess; this.User = user; this.Observation = observation; this.Job = job; }
public CoachingProcess Create(CreateCoachingProcessCommand command) { var coachingProcess = new CoachingProcess(command.Name, command.StartDate, command.Mode, command.Budget, command.Session, command.PerformaceIndicator, command.Coachee, command.Coach, command.Service, command.EndDate, command.Observation); coachingProcess.Validate(); _repository.Create(coachingProcess); if (Commit()) { return(coachingProcess); } return(null); }
public CoachingProcess CheckServiceRemoved(List<Service> listService, CoachingProcess coachingProcess) { var oldList = _repository.GetAllByCoachingProcess(coachingProcess.Id); foreach (var service in oldList) { if (!listService.Contains(service)) { coachingProcess.RemoveService(service); } } foreach (var service in listService) coachingProcess.AddService(service); return coachingProcess; }
public UpdateSessionCommand(Guid id, CoachingProcess coachingProcess, string theme, User user, DateTime date, TimeSpan startTime, TimeSpan?endTime, ESessionClassification classification, string observation, ICollection <Job> job, ICollection <EvaluationCoach> coach, ICollection <EvaluationCoachee> coachee) { this.Id = id; this.Theme = theme; this.Date = date; this.StartTime = startTime; this.EndTime = endTime; this.Classification = classification; this.CoachingProcess = coachingProcess; this.User = user; this.Observation = observation; this.Job = job; this.Coach = coach; this.Coachee = coachee; }
public UpdateSessionCommand(Guid id, CoachingProcess coachingProcess, string theme, User user, DateTime date, TimeSpan startTime, TimeSpan? endTime, ESessionClassification classification, string observation, ICollection<Job> job,ICollection<EvaluationCoach> coach, ICollection<EvaluationCoachee> coachee) { this.Id = id; this.Theme = theme; this.Date = date; this.StartTime = startTime; this.EndTime = endTime; this.Classification = classification; this.CoachingProcess = coachingProcess; this.User = user; this.Observation = observation; this.Job = job; this.Coach = coach; this.Coachee = coachee; }
public CoachingProcess CheckCoachRemovedOfCoachingProcess(List<Coach> listCoachingProcess, CoachingProcess coachingProcess) { var oldList = _repository.GetAllByCoachingProcess(coachingProcess.Id); foreach (var coach in oldList) { if (!listCoachingProcess.Contains(coach)) { coachingProcess.RemoveCoach(coach); } } foreach (var coach in listCoachingProcess) coachingProcess.AddCoach(coach); return coachingProcess; }
public CoachingProcess CheckServiceRemoved(List <Service> listService, CoachingProcess coachingProcess) { var oldList = _repository.GetAllByCoachingProcess(coachingProcess.Id); foreach (var service in oldList) { if (!listService.Contains(service)) { coachingProcess.RemoveService(service); } } foreach (var service in listService) { coachingProcess.AddService(service); } return(coachingProcess); }
public CoachingProcess CheckCoachRemovedOfCoachingProcess(List <Coach> listCoachingProcess, CoachingProcess coachingProcess) { var oldList = _repository.GetAllByCoachingProcess(coachingProcess.Id); foreach (var coach in oldList) { if (!listCoachingProcess.Contains(coach)) { coachingProcess.RemoveCoach(coach); } } foreach (var coach in listCoachingProcess) { coachingProcess.AddCoach(coach); } return(coachingProcess); }
public void AddCoachingProcess(CoachingProcess coachingProcess) { coachingProcess.Validate(); this.CoachingProcess.Add(coachingProcess); }
public void RemoveCoachingProcess(CoachingProcess coachingProcess) { this.CoachingProcess.Remove(coachingProcess); }
public void AddCoachingProcess(CoachingProcess coachingProcess) { coachingProcess.Validate(); this.CoachingProcess.Add(coachingProcess); }
public void AddCoachingProcess(CoachingProcess coachingProcess) { this.CoachingProcess.Add(coachingProcess); }
public void RemoveCoachingProcess(CoachingProcess coachingProcess) { this.CoachingProcess.Remove(coachingProcess); }
public static bool ChangeStartDateScopeIsValid(this CoachingProcess coachingProcess, DateTime startDate) { return(AssertionConcern.IsSatisfiedBy( AssertionConcern.AssertArgumentNotNull(startDate, Errors.StartDateIsRequired) )); }
public static bool ChangeModeScopeIsValid(this CoachingProcess coachingProcess, EModeProcess mode) { return(AssertionConcern.IsSatisfiedBy( AssertionConcern.AssertArgumentNotNull(mode, Errors.ModeIsRequired) )); }
public void AddCoachingProcess(CoachingProcess coachingProcess) { this.CoachingProcess.Add(coachingProcess); }
public void Create(CoachingProcess coachingProcess) { _context.CoachingProcess.Add(coachingProcess); }
public void Create(CoachingProcess coachingProcess) { _context.CoachingProcess.Add(coachingProcess); }
public void Delete(CoachingProcess coachingProcess) { _context.CoachingProcess.Remove(coachingProcess); }
public void Update(CoachingProcess coachingProcess) { _context.Entry <CoachingProcess>(coachingProcess).State = System.Data.Entity.EntityState.Modified; }
public static bool ChangeNameScopeIsValid(this CoachingProcess coachingProcess, string name) { return(AssertionConcern.IsSatisfiedBy( AssertionConcern.AssertArgumentNotNull(name, Errors.NameIsRequired) )); }
public void Update(CoachingProcess coachingProcess) { _context.Entry<CoachingProcess>(coachingProcess).State = System.Data.Entity.EntityState.Modified; }
public static bool ChangeEndDateScopeIsValid(this CoachingProcess coachingProcess, DateTime endDate) { return(AssertionConcern.IsSatisfiedBy( AssertionConcern.AssertArgumentIsGreaterOrEqualThan(endDate, coachingProcess.StartDate, Errors.StartDateIsRequired) )); }
public void Delete(CoachingProcess coachingProcess) { _context.CoachingProcess.Remove(coachingProcess); }