Exemple #1
0
 public ActionResult Edit(int id, Limweightedduration model)
 {
     try
     {
         InitRepos(true, false);
         model.Instruments = instrRepo.GetById(model.InstrumentId);
         limRepo.Update(model);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Exemple #2
0
 public ActionResult Create(Limweightedduration model)
 {
     try
     {
         // TODO: Add insert logic here
         InitRepos(true, false);
         model.Instruments = instrRepo.GetById(model.InstrumentId);
         limRepo.Create(model);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }