Esempio n. 1
0
        private IBindingList getRoutes(DateTime dateFrom, DateTime dateTo)
        {
            BindingList <object> bindingList = new BindingList <object>();
            ICollection <String> routesId    = service.GetUserRoutesIds(dateFrom, dateTo);

            foreach (string id in routesId)
            {
                service.GetRouteDescription(int.Parse(id), out DateTime start, out DateTime end,
                                            out decimal price, out string originStation, out string destinationStation);
                bindingList.Add(new { ds_id            = id, ds_start = start, ds_end = end, ds_price = price,
                                      ds_originStation = originStation, ds_destinationStation = destinationStation });
            }

            return(bindingList);
        }