public List <string> SendWorkHours(WorkHourJson workHourJson)//JObject jsonObject { UnitOfWork uow = new UnitOfWork(); UserManager userManager = new UserManager(uow); TimeSheetManager WHM = new TimeSheetManager(uow); User currUser = new UserHelper().GetCurrent(); Validations validate = new Validations(); var WorkHours = WHM.GetBydateAndUserId(workHourJson.Date, currUser.ID); List <string> result = new List <string>(); foreach (var wh in WorkHours.ToList()) { if (wh.WorkflowStage.IsFirst) { result = validate.ValidateRegisterWorkHour(wh); if (result.Count() > 0) { return(result); } WHM.SendWorkHour(wh); HistoryUtilities.RegisterSendHistory(wh); result.Add("عملیات ارسال کارکرد ها با موفقیت انجام گردید"); } } return(result); }