Exemplo n.º 1
0
        public ActionResult Save(ModelInfoViewModel model)
        {
            var modelDto = new DtoModel {
                Id = model.Id, Name = model.Name, BrandId = model.BrandId
            };

            _modelService.SaveModel(modelDto);

            return(RedirectToAction("Details", "Brand", new { @brandId = model.BrandId }));
        }
Exemplo n.º 2
0
        public ActionResult Edit(int brandedModelId)
        {
            var brandedModel = _modelService.GetModel(brandedModelId);
            var model        = new ModelInfoViewModel
            {
                Id      = brandedModel.Id,
                Name    = brandedModel.Name,
                BrandId = brandedModel.BrandId
            };

            ViewBag.Title = "Редактирование модели автомобиля";

            return(View(model));
        }
Exemplo n.º 3
0
 public void Init(PFE.Model.Model model, MainForm main)
 {
     viewModel = new ModelInfoViewModel(model, main);
     loadExistingSurveys();
     textBoxEvaluationContext.DataBindings.Add("Text", viewModel.model, "evaluationContext", true, DataSourceUpdateMode.OnPropertyChanged);
 }