コード例 #1
0
 //[AutFilter]
 public ActionResult Edit(Arac data)
 {
     if (ModelState.IsValid)
     {
         ar.Update(data);
         return(RedirectToAction("List"));
     }
     else
     {
         ModelState.AddModelError(string.Empty, "Kayıt hatası");
     }
     return(View(data));
 }
コード例 #2
0
 public void Update(Arac model)
 {
     using (AracRepository aracRepo = new AracRepository())
     {
         try
         {
             aracRepo.Update(model);
         }
         catch (Exception ex)
         {
             throw;
         }
     }
 }
コード例 #3
0
 public bool UpdateArac(Arac entity)
 {
     try
     {
         bool isSuccess;
         using (var repo = new AracRepository())
         {
             isSuccess = repo.Update(entity);
         }
         return(isSuccess);
     }
     catch (Exception ex)
     {
         LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true);
         throw new Exception("BusinessLogic:AracBusiness::UpdateArac::Error occured.", ex);
     }
 }
コード例 #4
0
 public bool AracGuncelle(Arac arac)
 {
     try
     {
         bool isSuccess;
         using (var repo = new AracRepository())
         {
             isSuccess = repo.Update(arac);
         }
         return(isSuccess);
     }
     catch (Exception ex)
     {
         LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true);
         throw new Exception("Business:AracBusiness::AracGuncelle::Hata Oluştu.", ex);
     }
 }