public IHttpActionResult GetEmployeeForManger(EmpAssignOrderVm model) { if (model == null) { return(BadRequest()); } var emps = hrUnitOfWork.PeopleRepository.GetEmployeeManagedByManagerId(model.CompanyId, model.Culture, model.EmpId); if (emps == null) { return(NotFound()); } return(Ok(emps)); }
public IHttpActionResult GetMangerAssignOrders(EmpAssignOrderVm model) { if (model == null) { return(BadRequest()); } var date = DateTime.Now.Date; var list = hrUnitOfWork.LeaveRepository.ReadAssignOrders(model.CompanyId, model.Culture).Where(ord => ord.ManagerId == model.EmpId && ord.AssignDate >= date).ToList(); if (list == null) { return(NotFound()); } return(Ok(list)); }