コード例 #1
0
 public ActionResult Edit(int id, Limdealer model)
 {
     try
     {
         InitRepos(true, false);
         model.Currencies = currRepo.GetById(model.CurrencyId);
         model.Dealer     = dealersRepo.GetById(model.UserId);
         limRepo.Update(model);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
コード例 #2
0
 public ActionResult Create(Limdealer model)
 {
     try
     {
         // TODO: Add insert logic here
         InitRepos(true, false);
         model.Currencies = currRepo.GetById(model.CurrencyId);
         model.Dealer     = dealersRepo.GetById(model.UserId);
         limRepo.Create(model);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }