Ejemplo n.º 1
0
        public VolunteerStatisticMapper()
        {
            SQLiteDataReader reader = StaticDBConnection.QueryDatabase(dbQuery);

            while (reader.Read())
            {
                String   volunteer   = reader["Name"].ToString();
                DateTime start       = Convert.ToDateTime(reader["Joined"].ToString());
                DateTime end         = Convert.ToDateTime(reader["Departure"].ToString());
                String   operationID = reader["Operation_ID"].ToString();

                //Creating volunteerStatistic
                VolunteerStatistic vs = new VolunteerStatistic(volunteer, start, end, operationID);
                volunteerStatisticList.Add(vs);
            }
            StaticDBConnection.CloseConnection();
        }
Ejemplo n.º 2
0
 //order the list according to alphabetical order
 private void orderList()
 {
     volunteerStatisticList = volunteerStatisticList.OrderBy(VolunteerStatistic => VolunteerStatistic.getName()).ToList();
 }