Ejemplo n.º 1
0
        private void RefreshGrid()
        {
            List <OverviewGridItemHolder> data;
            Dictionary <string, string>   distinctLocations;

            var mergedParameters = ucResParameters.GetParameterDictionary();

            using (var dataAccess = new ReservationOverviewDataAccess(mergedParameters))
            {
                lblLastUpdate.Text = dataAccess.GetLastGwdRequest();

                data = dataAccess.GetReservationOverviewGrid();

                distinctLocations = dataAccess.GetDistinctPickupLocationIds();
            }

            ucVehicleOverview.DistinctLocations = distinctLocations;
            ucVehicleOverview.OverviewData      = data;
            var activeCountries = data.Select(d => new CountryHolder {
                CountryDescription = d.CountryName, CountryId = d.CountryId
            }).Distinct().ToList();

            ucVehicleOverview.OwningCountries = activeCountries;
            pnlOverviewGrid.Visible           = true;

            //ucVehicleOverview.AddColumns();
        }
        public void TestMethod2()
        {
            var parameters = new Dictionary <DictionaryParameter, string>();

            parameters[DictionaryParameter.ReservationCheckOutInDateLogic] = false.ToString();


            using (var dataAccess = new ReservationOverviewDataAccess(parameters))
            {
                var data = dataAccess.GetReservationOverviewGrid();
                var dict = dataAccess.GetCountryDescriptionDictionary();
            }
        }