示例#1
0
        public IActionResult New()
        {
            var item = new FuzzyParameterDataEntryModel();

            item.GrowthStages = _model.GetLookup();
            return(View("Form", item));
        }
示例#2
0
        public IActionResult Edit(int id)
        {
            var item = new FuzzyParameterDataEntryModel
            {
                FuzzyParameter = _model.GetById(id),
                GrowthStages   = _model.GetLookup()
            };

            return(View("Form", item));
        }
示例#3
0
 public IActionResult Save(FuzzyParameterDataEntryModel item)
 {
     if (item.FuzzyParameter.Id == 0)
     {
         _model.New(item.FuzzyParameter);
     }
     else
     {
         _model.Update(item.FuzzyParameter);
     }
     return(View("Index", _model.GetAll()));
 }