protected override bool OnBubbleEvent(object sender, EventArgs args) { var handled = false; if (args is CommandEventArgs) { var commandEventArgs = args as CommandEventArgs; if (commandEventArgs.CommandName == UserControls.Phase4.HelpIcons.ExportToExcel.ExportString) { ExportToExcel(); handled = true; } } if (args is GridViewCommandEventArgs) { var commandArgs = args as GridViewCommandEventArgs; if (commandArgs.CommandName == "ShowVehicles") { var reservationId = int.Parse(commandArgs.CommandArgument.ToString()); List <VehicleMatchGridRow> data; using (var dataAccess = new MatchDataAccess(null)) { data = dataAccess.GetVehicleMatches(reservationId); } ucFleetMatchGrid.GridData = data; upnlMultiview.Update(); } } return(handled); }
public void TestMethod3() { var parameters = new Dictionary <DictionaryParameter, string>(); parameters[DictionaryParameter.LocationCountry] = "GE"; using (var dataAccess = new MatchDataAccess(parameters)) { var d = dataAccess.GetVehicleMatches(); } }
private void RefreshGrid() { var mergedParameters = ucParameters.GetParameterDictionary(); List <VehicleMatchGridRow> data; using (var dataAccess = new MatchDataAccess(mergedParameters)) { lblLastUpdate.Text = LastUpdatedFromFleetNow.GetLastUpdatedDateTime(dataAccess); lblReservationUpdate.Text = dataAccess.GetLastGwdRequest(); data = dataAccess.GetVehicleMatches(); } ucFleetMatchGrid.GridData = data; ucReservationMatchGrid.GridData = null; pnlOverviewGrid.Visible = true; ucExportToExcel.Visible = true; }