public BusinessTripPlan(BusinessTripPlanCreate command) { ClientId = command.ClientId; Hours = command.NumberBusinessTripHours; Date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); CompletedType = BusinessTripCompletedType.DidntCompleted; }
public IActionResult Post([FromBody] BusinessTripPlanCreate value) { value.ManagerId = _accountInformationService.GetOperatorId(); _monthlyBusinessTripService.Create(value); return(Ok(new { clientId = value.ClientId, amountTrips = value.NumberBusinessTripHours })); }
public BusinessTripPlan Create(BusinessTripPlanCreate command) { return(_monthlyBusinessTripPlanRepository.Create( new BusinessTripPlan(command))); }