public void MoveToPreviousStep(AgencyImportStep step) { if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else { switch (step) { case AgencyImportStep.FieldsMatcher: View.GotoStep(AgencyImportStep.SourceCSV); break; case AgencyImportStep.ItemsSelctor: View.GotoStep(AgencyImportStep.FieldsMatcher); break; case AgencyImportStep.OrganizationAvailability: View.GotoStep(AgencyImportStep.ItemsSelctor); break; case AgencyImportStep.Summary: View.GotoStep(AgencyImportStep.OrganizationAvailability); break; case AgencyImportStep.ImportCompleted: if (View.ItemsToSelect > 0 && View.PreviousStep != AgencyImportStep.None) { View.GotoStep(View.PreviousStep); } else { View.GotoStep(AgencyImportStep.SourceCSV, true); } View.PreviousStep = AgencyImportStep.None; break; case AgencyImportStep.ImportWithErrors: if (View.ItemsToSelect > 0 && View.PreviousStep != AgencyImportStep.None) { View.GotoStep(View.PreviousStep); } else { View.GotoStep(AgencyImportStep.SourceCSV, true); } View.PreviousStep = AgencyImportStep.None; break; case AgencyImportStep.Errors: View.GotoStep(View.PreviousStep); break; } } }
private void UpdateStepsToSkip(AgencyImportStep step, Boolean add) { List <AgencyImportStep> toSkip = View.SkipSteps; if (add && !toSkip.Contains(step)) { toSkip.Add(step); } else if (!add && toSkip.Contains(step)) { toSkip.Remove(step); } View.SkipSteps = toSkip; }
public void MoveToNextStep(AgencyImportStep step) { switch (step) { case AgencyImportStep.SourceCSV: MoveFromSelectedSource(); break; case AgencyImportStep.FieldsMatcher: MoveFromFieldsMatcher(); break; case AgencyImportStep.ItemsSelctor: MoveFromItemsSelector(); break; case AgencyImportStep.OrganizationAvailability: MoveFromOrganizationAvailability(); break; } }