コード例 #1
0
        private static List <DateTime> GetLeaves(Guid loggedInEmployeeId, DateTime dateFrom, DateTime dateTo)
        {
            var leaveList = DatabaseSnapshots <LeaveModel> .Get("Leave").List;

            var leaves = leaveList?.Where(y => y.EmployeeId == loggedInEmployeeId && y.LeaveDate <= dateTo && y.LeaveDate >= dateFrom)?.Select(x => x.LeaveDate.Date).ToList();

            return(leaves);
        }
コード例 #2
0
        private static List <DateTime> GetHolidays(DateTime dateFrom, DateTime dateTo)
        {
            var holidayList = DatabaseSnapshots <HolidayModel> .Get("Holiday").List;

            var holidays = holidayList?.Where(y => y.HolidayDate <= dateTo && y.HolidayDate >= dateFrom)?.Select(x => x.HolidayDate.Date).ToList();

            return(holidays);
        }
コード例 #3
0
ファイル: Employee.cs プロジェクト: avadheshkmr1394/IRPortal
 public static List <LeaveModel> GetLeaves()
 {
     return(DatabaseSnapshots <Models.LeaveModel> .Get("Leave").List);
 }
コード例 #4
0
ファイル: Employee.cs プロジェクト: avadheshkmr1394/IRPortal
 public static List <EmployeeModel> GetEmployees()
 {
     return(DatabaseSnapshots <Models.EmployeeModel> .Get("Employee").List);
 }
コード例 #5
0
 private static List <IncompleteAttendanceModel> GetMarkedAttendanceList(Guid loggedInEmployeeId, DateTime dateFrom, DateTime dateTo)
 {
     return(DatabaseSnapshots <AttendanceModel> .Get("Attendance").List?.Where(x => x.EmployeeId == loggedInEmployeeId && ((x.IsWorkFromHome ?? false) == true || x.InTime != null || x.OutTime != null) && x.AttendanceDate <= dateTo && x.AttendanceDate >= dateFrom)?.Select(x => new IncompleteAttendanceModel {
         DateTime = x.AttendanceDate, InTime = x.InTime, OutTime = x.OutTime, IsWorkFromHome = x.IsWorkFromHome
     }).ToList());
 }