Exemplo n.º 1
0
 public IActionResult TitleAndDescription(int? id)
 {
     WizardModel model = new WizardModel(GetSteps(0));
     model.CurrentStepIndex = 0;
     model.AllowFinish = ModelState.IsValid;
     return View(model);
 }
Exemplo n.º 2
0
 public IActionResult OpenPositions(int? id)
 {
     WizardModel model = new WizardModel(GetSteps(2));
     model.CurrentStepIndex = 2;
     model.AllowFinish = ModelState.IsValid;
     return View(model);
 }
Exemplo n.º 3
0
 public IActionResult OpenPositions(WizardModel model)
 {
     model.CurrentStepIndex = 2;
     model.WizardSteps = GetSteps(2);
     model.AllowFinish = ModelState.IsValid;
     return View(model);
 }
Exemplo n.º 4
0
 public IActionResult CollaborationSettings(WizardModel model)
 {
     model.CurrentStepIndex = 1;
     model.WizardSteps = GetSteps(1);
     model.AllowFinish = ModelState.IsValid;
     return View(model);
 }
Exemplo n.º 5
0
 public IActionResult CollaborationSettings(int? id)
 {
     WizardModel model = new WizardModel(GetSteps(1));
     model.CurrentStepIndex = 1;
     model.AllowFinish = ModelState.IsValid;
     return View(model);
 }
Exemplo n.º 6
0
 public IActionResult AlertSettings(WizardModel model)
 {
     model.CurrentStepIndex = 3;
     model.WizardSteps = GetSteps(3);
     model.AllowFinish = ModelState.IsValid;
     return View(model);
 }
Exemplo n.º 7
0
        public IActionResult WizardCompleted()
        {
            WizardModel model = new WizardModel(GetSteps(4));
            model.CurrentStepIndex = 4;
            model.ShowWizardSteps = false;
            //save data here
            if (ModelState.IsValid)
            {

            }
            return View(model);
        }
Exemplo n.º 8
0
 public IActionResult TitleAndDescription(WizardModel model)
 {
     model.CurrentStepIndex = 0;
     model.WizardSteps = GetSteps(1);
     model.AllowFinish = ModelState.IsValid;
     return View(model);
 }
Exemplo n.º 9
0
        private WizardModel UpdateModel(WizardModel model)
        {
            if (model == null)
            {
                return new WizardModel();
            }
            if (model.NewWorkspace != null
                && model.NewWorkspace.CollaborationSpaceId != 0)
            {
                var storedModel =
                    _Uow.CollaborationSpaceRepository.GetEntityById(a =>
                    a.CollaborationSpaceId == model.NewWorkspace.CollaborationSpaceId);

                if (storedModel != null)
                {
                    // if value in database contains data and model from
                    // page is empty, use value from database
                    model.NewWorkspace.CopyrightModel =
                        (model.NewWorkspace.CopyrightModel == ProjectCopyrightModel.NotSet)
                        ? storedModel.CopyrightModel : model.NewWorkspace.CopyrightModel;

                    model.NewWorkspace.Description = (string.IsNullOrWhiteSpace(model.NewWorkspace.Description))
                        ? storedModel.Description : model.NewWorkspace.Description;

                    model.NewWorkspace.Title = (string.IsNullOrWhiteSpace(model.NewWorkspace.Title))
                        ? storedModel.Title : model.NewWorkspace.Title;
                }
            }
            return model;
        }
Exemplo n.º 10
0
 private void SaveModel(WizardModel model)
 {
     if (model.NewWorkspace != null &&
         model.NewWorkspace.CollaborationSpaceId == 0) {
         _Uow.CollaborationSpaceRepository.Insert(model.NewWorkspace);
     }
     else
     {
         _Uow.CollaborationSpaceRepository.Update(model.NewWorkspace);
     }
     _Uow.Save();
 }