public ActionResult Edit(int id, Liminstrumentduration model) { try { InitRepos(true, false); model.Currencies = currRepo.GetById(model.CurrencyId); model.Instruments = instrRepo.GetById(model.InstrumentId); model.Instrumentterms = instrTermRepo.GetById(model.InstrumentTermId); limRepo.Update(model); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(Liminstrumentduration model) { try { // TODO: Add insert logic here InitRepos(true, false); model.Currencies = currRepo.GetById(model.CurrencyId); model.Instruments = instrRepo.GetById(model.InstrumentId); model.Instrumentterms = instrTermRepo.GetById(model.InstrumentTermId); limRepo.Create(model); return(RedirectToAction("Index")); } catch { return(View()); } }