private void OnAnalyticIsDirtyChanged(bool isDirty) { if (isDirty) { SelectedFeature.SelectedStep.IsCompleted = false; SelectedFeature.DisableRemainingSteps(); } }
private void OnDriverDirtyChanged(bool isDirty) { if (isDirty) { SelectedFeature.SelectedStep.IsCompleted = false; SelectedFeature.DisableRemainingSteps(); } //Update dependent calculated properties. this.RaisePropertyChanged("IsAnyValueDriverDirty"); }
private void OnFilterGroupChanged(IReactivePropertyChangedEventArgs <FilterGroup> args) { var source = args.Sender as FilterGroup; if (source != null && source.IsDirty) { SelectedFeature.SelectedStep.IsCompleted = false; SelectedFeature.DisableRemainingSteps(); } //Update dependent calculated properties. this.RaisePropertyChanged("ValidationResults"); this.RaisePropertyChanged("IsAnyFilterGroupDirty"); }
//TODO: flesh out implementation. This is a starting point only. private void HandleSelectedAction(DisplayEntities.Action action) { switch (action.TypeId) { //Create a new current entity. case DTO.ModuleFeatureStepActionType.PlanningAnalyticsSearchAnalyticsNew: //Create a new (blank) entity. TODO: refactor. var newAnalytic = new DisplayEntities.Analytic(); newAnalytic.Identity.Name = "Analytic name (new)"; newAnalytic.Identity.Description = "Description (new)"; newAnalytic.IsDirty = true; SelectedAnalytic = newAnalytic; SelectedFeature.SelectedStep = SelectedFeature.DefaultActionStep; SelectedFeature.DisableRemainingSteps(); break; case DTO.ModuleFeatureStepActionType.PlanningEverydayPricingSearchEverydayNew: case DTO.ModuleFeatureStepActionType.PlanningPromotionPricingSearchPromotionsNew: case DTO.ModuleFeatureStepActionType.PlanningKitPricingSearchKitsNew: //Create a new (blank) entity. TODO: refactor. var newPriceRoutine = new DisplayEntities.Pricing(); newPriceRoutine.Identity.Name = "Analytic name (new)"; newPriceRoutine.Identity.Description = "Description (new)"; newPriceRoutine.IsDirty = true; SelectedPriceRoutine = newPriceRoutine; SelectedFeature.SelectedStep = SelectedFeature.DefaultActionStep; SelectedFeature.DisableRemainingSteps(); break; case APLPX.Client.Entity.ModuleFeatureStepActionType.PlanningAnalyticsSearchAnalyticsEdit: SelectedFeature.SelectedStep = SelectedFeature.DefaultActionStep; ExecuteAsyncCommand(LoadAnalyticCommand, x => SelectedFeatureViewModel = GetViewModel(SelectedStep), "Retrieving analytic...", "Analytic was successfully retrieved."); break; case APLPX.Client.Entity.ModuleFeatureStepActionType.PlanningEverydayPricingSearchEverydayEdit: case APLPX.Client.Entity.ModuleFeatureStepActionType.PlanningPromotionPricingSearchPromotionsEdit: case APLPX.Client.Entity.ModuleFeatureStepActionType.PlanningKitPricingSearchKitsEdit: //TODO: get the full entity from the server and load edit screen. //This is a simulation only. SelectedPriceRoutine = SelectedEntity as DisplayEntities.Pricing; SelectedFeature.SelectedStep = SelectedFeature.DefaultActionStep; break; //Copy current entity. case DTO.ModuleFeatureStepActionType.PlanningAnalyticsSearchAnalyticsCopy: //Create a copy of the existing entity and load edit screen. SelectedAnalytic = SelectedAnalytic.Copy(); SelectedFeature.SelectedStep = SelectedFeature.DefaultActionStep; SelectedFeature.DisableRemainingSteps(); break; case DTO.ModuleFeatureStepActionType.PlanningPromotionPricingSearchPromotionsCopy: case DTO.ModuleFeatureStepActionType.PlanningEverydayPricingSearchEverydayCopy: case DTO.ModuleFeatureStepActionType.PlanningKitPricingSearchKitsCopy: //Create a copy of the existing entity and load edit screen. SelectedPriceRoutine = SelectedPriceRoutine.Copy(); SelectedFeature.SelectedStep = SelectedFeature.DefaultActionStep; SelectedFeature.DisableRemainingSteps(); break; //Save the current entity. case APLPX.Client.Entity.ModuleFeatureStepActionType.PlanningAnalyticsIdentitySave: //TODO: call analytic save method on service. ExecuteAsyncCommand(SaveAnalyticIdentityCommand, x => SelectedFeatureViewModel = GetViewModel(SelectedStep), "Identity saving...", "Identity saved."); SelectedAnalytic.IsDirty = false; SelectedFeature.EnableRemainingSteps(); break; case APLPX.Client.Entity.ModuleFeatureStepActionType.PlanningEverydayPricingIdentitySave: case APLPX.Client.Entity.ModuleFeatureStepActionType.PlanningPromotionPricingIdentitySave: case APLPX.Client.Entity.ModuleFeatureStepActionType.PlanningKitPricingIdentitySave: //TODO: call price routine save method on service. SelectedPriceRoutine.IsDirty = false; SelectedFeature.EnableRemainingSteps(); break; case APLPX.Client.Entity.ModuleFeatureStepActionType.PlanningAnalyticsFiltersSave: ExecuteAsyncCommand(SaveFiltersCommand, x => SelectedFeatureViewModel = GetViewModel(SelectedStep), "Filters saving...", "Filters saved."); break; case APLPX.Client.Entity.ModuleFeatureStepActionType.PlanningAnalyticsPriceListsSave: ExecuteAsyncCommand(SavePriceListsCommand, x => SelectedFeatureViewModel = GetViewModel(SelectedStep), "Price Lists saving...", "Price Lists saved."); break; case APLPX.Client.Entity.ModuleFeatureStepActionType.PlanningAnalyticsValueDriversSave: ExecuteAsyncCommand(SaveValueDriversCommand, x => SelectedFeatureViewModel = GetViewModel(SelectedStep), "Value Drivers saving...", "Value Drivers saved."); break; case APLPX.Client.Entity.ModuleFeatureStepActionType.PlanningEverydayPricingPriceListsSave: case APLPX.Client.Entity.ModuleFeatureStepActionType.PlanningPromotionPricingPriceListsSave: case APLPX.Client.Entity.ModuleFeatureStepActionType.PlanningKitPricingPriceListsSave: break; } }