コード例 #1
0
 public IActionResult OpenPositions(NewCollabrationSpaceWizardModel model)
 {
     model.CurrentStepIndex = 2;
     model.WizardSteps = GetSteps(2);
     model.AllowFinish = ModelState.IsValid;
     return View(model);
 }
コード例 #2
0
 public IActionResult TitleAndDescription(int? id)
 {
     NewCollabrationSpaceWizardModel model = new NewCollabrationSpaceWizardModel(GetSteps(0));
     model.CurrentStepIndex = 0;
     model.AllowFinish = ModelState.IsValid;
     return View(model);
 }
コード例 #3
0
 public IActionResult OpenPositions(int? id)
 {
     NewCollabrationSpaceWizardModel model = new NewCollabrationSpaceWizardModel(GetSteps(2));
     model.CurrentStepIndex = 2;
     model.AllowFinish = ModelState.IsValid;
     return View(model);
 }
コード例 #4
0
 public IActionResult CollaborationSettings(NewCollabrationSpaceWizardModel model)
 {
     model.CurrentStepIndex = 1;
     model.WizardSteps = GetSteps(1);
     model.AllowFinish = ModelState.IsValid;
     return View(model);
 }
コード例 #5
0
 public IActionResult CollaborationSettings(int? id)
 {
     NewCollabrationSpaceWizardModel model = new NewCollabrationSpaceWizardModel(GetSteps(1));
     model.CurrentStepIndex = 1;
     model.AllowFinish = ModelState.IsValid;
     return View(model);
 }
コード例 #6
0
        public IActionResult WizardCompleted()
        {
            NewCollabrationSpaceWizardModel model = new NewCollabrationSpaceWizardModel(GetSteps(4));
            model.CurrentStepIndex = 4;
            model.ShowWizardSteps = false;
            //save data here
            if (ModelState.IsValid)
            {

            }
            return View(model);
        }
コード例 #7
0
 public IActionResult TitleAndDescription(NewCollabrationSpaceWizardModel model)
 {
     model.CurrentStepIndex = 0;
     model.WizardSteps = GetSteps(1);
     model.AllowFinish = ModelState.IsValid;
     return View(model);
 }
コード例 #8
0
        private NewCollabrationSpaceWizardModel UpdateModel(NewCollabrationSpaceWizardModel model)
        {
            if (model == null)
            {
                return new NewCollabrationSpaceWizardModel();
            }
            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;
        }
コード例 #9
0
 private void SaveModel(NewCollabrationSpaceWizardModel model)
 {
     if (model.NewWorkspace != null &&
         model.NewWorkspace.CollaborationSpaceId == 0) {
         _Uow.CollaborationSpaceRepository.Insert(model.NewWorkspace);
     }
     else
     {
         _Uow.CollaborationSpaceRepository.Update(model.NewWorkspace);
     }
     _Uow.Save();
 }