/// <summary>
        /// Save deletegate task fromuser touser.
        /// </summary>
        /// <param name="model">The information delegate task.</param>
        /// <returns></returns>
        public ResultViewModel SaveDelegateFromInbox(WorkflowDelegateRequestModel model)
        {
            var result = new ResultViewModel();

            using (TransactionScope scope = new TransactionScope())
            {
                var data = new WorkflowDelegate
                {
                    FromUser  = _token.AdUser,
                    ToUser    = model.ToUser,
                    StartDate = UtilityService.ConvertToDateTime(model.StartDate, ConstantValue.DateTimeFormat),
                    EndDate   = UtilityService.ConvertToDateTime(model.EndDate, ConstantValue.DateTimeFormat)
                };
                _unitOfWork.GetRepository <WorkflowDelegate>().Add(data);
                _k2Service.SetOutofOffice(data.FromUser, data.ToUser, ConstantValue.K2SharingCreate, data.StartDate.Value, data.EndDate.Value);
                _unitOfWork.Complete(scope);
            }
            return(result);
        }
 public IActionResult UpdateDelegateInbox([FromBody] WorkflowDelegateRequestModel model)
 {
     return(Ok(_workflowDelegate.UpdateDelegateInbox(model)));
 }