/// <summary> /// Find leaves /// </summary> /// <param name="supervisor">Supervisor name</param> /// <param name="applicant">Applicant name</param> /// <param name="leaveTypeId">GUID of leave type</param> /// <param name="leaveStatus">Leave status</param> /// <param name="start">Start time</param> /// <param name="end">End time</param> /// <param name="supervisorIDs">GUIDs of supervisor</param> /// <returns>List of leaves</returns> public List <LeaveInfo> FindLeaves(string supervisor, string applicant, string leaveTypeId, string leaveStatus, DateTime start, DateTime end, string supervisorIDs) { Log.Info(GlobalParams.StartFindLeaves); List <LeaveInfo> result = null; try { if (leaveStatus == "All") { leaveStatus = "None"; } LeaveStatus status = (LeaveStatus)Enum.Parse(typeof(LeaveStatus), leaveStatus); result = LeaveBLL.FindLeaves(supervisor, applicant, leaveTypeId, (int)status, start, end, supervisorIDs); } catch (Exception ex) { Log.Exception(ex.StackTrace); Log.Exception(ex.Message); throw ex; } Log.Info(GlobalParams.EndFindLeaves); return(result); }