public StandardWizardButton(StandardStepWizardMode mode, bool isAjax = true, bool existDatatables = false, bool requiredCer = false, StandardWizardToorbarPosition toorbarPosition = StandardWizardToorbarPosition.Bottom) { ToolBarPosition = toorbarPosition; IsAjax = isAjax; ExistDatatables = existDatatables; RequiredCer = requiredCer; SetStandardWizard(mode); }
private void SetStandardWizard(StandardStepWizardMode mode) { _Buttons = new List <WizardButton>(); _Buttons.Add(new WizardButton(StandardWizardButtonName.Back, StandardWizardButtonName.Back, Translation.CenterLang.Center.Previous, true, FaIcons.FaBackward)); if (mode == StandardStepWizardMode.SaveDraft) { _Buttons.Add(new WizardButton(StandardWizardButtonName.Reset, StandardWizardButtonName.Reset, Translation.CenterLang.Center.Reset, false, FaIcons.FaRefresh)); _Buttons.Add(new WizardButton(StandardWizardButtonName.Save, StandardWizardButtonName.Save, Translation.CenterLang.Center.Save, true, FaIcons.FaSave, requiredCer: RequiredCer)); } _Buttons.Add(new WizardButton(StandardWizardButtonName.Next, StandardWizardButtonName.Next, Translation.CenterLang.Center.SaveNext, true, FaIcons.FaForward, requiredCer: RequiredCer)); _Buttons.Add(new WizardButton(StandardWizardButtonName.Last, StandardWizardButtonName.Last, Translation.CenterLang.Center.Finished, true, FaIcons.FaCheck, requiredCer: RequiredCer)); }
private void SetStandardWizard(StandardStepWizardMode mode, StandardStepWizard step) { _Buttons = new List <WizardButton>(); if (step == StandardStepWizard.First) { if (mode == StandardStepWizardMode.SaveDraft) { _Buttons.Add(new WizardButton(StandardWizardButtonName.Reset, StandardWizardButtonName.Reset, Translation.CenterLang.Center.Reset, false, FaIcons.FaRefresh)); _Buttons.Add(new WizardButton(StandardWizardButtonName.Save, StandardWizardButtonName.Save, Translation.CenterLang.Center.Save, true, FaIcons.FaSave, requiredCer: RequiredCer)); } _Buttons.Add(new WizardButton(StandardWizardButtonName.Next, StandardWizardButtonName.Next, Translation.CenterLang.Center.SaveNext, true, FaIcons.FaForward, StandardIconPosition.AfterText, requiredCer: RequiredCer, type: StandButtonType.ButtonComfirmAjax, isValidate: true)); } else if (step == StandardStepWizard.Last) { _Buttons.Add(new WizardButton(StandardWizardButtonName.Back, StandardWizardButtonName.Back, Translation.CenterLang.Center.Back, true, FaIcons.FaBackward)); if (mode == StandardStepWizardMode.SaveDraft) { _Buttons.Add(new WizardButton(StandardWizardButtonName.Reset, StandardWizardButtonName.Reset, Translation.CenterLang.Center.Reset, true, FaIcons.FaRefresh)); _Buttons.Add(new WizardButton(StandardWizardButtonName.Save, StandardWizardButtonName.Save, Translation.CenterLang.Center.Save, true, FaIcons.FaSave, requiredCer: RequiredCer)); } _Buttons.Add(new WizardButton(StandardWizardButtonName.Last, StandardWizardButtonName.Last, Translation.CenterLang.Center.Finished, true, FaIcons.FaCheck, requiredCer: RequiredCer)); } else { _Buttons.Add(new WizardButton(StandardWizardButtonName.Back, StandardWizardButtonName.Back, Translation.CenterLang.Center.Back, true, FaIcons.FaBackward)); if (mode == StandardStepWizardMode.SaveDraft) { _Buttons.Add(new WizardButton(StandardWizardButtonName.Reset, StandardWizardButtonName.Reset, Translation.CenterLang.Center.Reset, true, FaIcons.FaRefresh)); _Buttons.Add(new WizardButton(StandardWizardButtonName.Save, StandardWizardButtonName.Save, Translation.CenterLang.Center.Save, true, FaIcons.FaSave, requiredCer: RequiredCer)); } _Buttons.Add(new WizardButton(StandardWizardButtonName.Next, StandardWizardButtonName.Next, Translation.CenterLang.Center.SaveNext, true, FaIcons.FaForward, StandardIconPosition.AfterText, requiredCer: RequiredCer)); if (mode == StandardStepWizardMode.NonHaveNextButton) { _Buttons.RemoveAll(b => b.Name == StandardWizardButtonName.Next); } } }
public StandardWizardButton(StandardStepWizardMode mode, StandardWizardToorbarPosition toorbarPosition = StandardWizardToorbarPosition.Bottom) { ToolBarPosition = toorbarPosition; SetStandardWizard(mode); }