Пример #1
0
        public static List <SickDay> RePackage(SqlDataReader dr)
        {
            var sickDayList = new List <SickDay>();

            var sickDayId        = dr.GetOrdinal("SickDayId");
            var sickDayDate      = dr.GetOrdinal("Date");
            var sickDayIsFullDay = dr.GetOrdinal("IsFullDay");

            while (dr.Read())
            {
                var sd = new SickDay();
                sd.sickDayID = Convert.ToInt32(dr[sickDayId]);
                sd.date      = Convert.ToDateTime(dr[sickDayDate]);
                sd.isFullDay = Convert.ToBoolean(dr[sickDayIsFullDay]);

                sickDayList.Add(sd);
            }

            return(sickDayList);
        }
Пример #2
0
 public static bool RecordSickDay(SickDay sickday, int employeeId)
 {
     return(SickDaySQL.RecordSickDay(sickday, employeeId));
 }
Пример #3
0
 public static List <SickDay> GetSickDays(int employeeId)
 {
     return(SickDay.RePackage(EmployeeSQL.GetSickDays(employeeId)));
 }