/// <summary> /// Fill seasonal employee /// </summary> /// <param name="reader"></param> /// <returns></returns> private SeasonalEmployee FillSeasonalEmployee(SqlDataReader reader) { float piecePay = 0; SeasonalEmployee sn = EmployeeFactory.CreateSeasonalEmployee(); FillBaseEmployee(sn, reader); sn.Season = reader["season"].ToString(); sn.SeasonYear = reader["season_year"].ToString(); if (float.TryParse(reader["piece_pay"].ToString(), out piecePay)) { sn.PiecePay = piecePay; } else { sn.PiecePay = null; } return(sn); }