private void btnDemoDone_Click(object sender, RoutedEventArgs e) { SetTemplateOfControlFromResource(ctrlBtnDemo, BtnRecordDemoTemplateResourceKey); if (routeSetClimbMode == ClimbMode.Boulder) { if (rocksOnRoute.Any()) { BoulderRoute newBoulderRoute = CreateBoulderRouteFromUi(); BoulderRouteAndRocksDataAccess.InsertRouteAndRocksOnRoute( newBoulderRoute, rocksOnRoute, true); } } }
public static RocksOnRouteViewModel CreateFromDatabase(ClimbMode aClimbMode, string routeId, Canvas aCanvas, CoordinateMapper coordinateMapper) { IList <RockOnRouteViewModel> rocksOnRouteVM; switch (aClimbMode) { case ClimbMode.Boulder: default: rocksOnRouteVM = BoulderRouteAndRocksDataAccess.RocksByRouteId(routeId, aCanvas, coordinateMapper).ToList(); break; case ClimbMode.Training: rocksOnRouteVM = TrainingRouteAndRocksDataAccess.OrderedRocksByRouteId(routeId, aCanvas, coordinateMapper).ToList(); break; } return(new RocksOnRouteViewModel(aCanvas, aClimbMode, rocksOnRouteVM)); }
public void SaveRocksOnBoulderRoute(BoulderRoute boulderRoute) { BoulderRouteAndRocksDataAccess.InsertRouteAndRocksOnRoute( boulderRoute, rocksOnRoute, true); }
public string SaveRocksOnBoulderRoute(BoulderRoute boulderRoute) { return(BoulderRouteAndRocksDataAccess.InsertRouteAndRocksOnRoute( boulderRoute, rocksOnRoute, true)); }