Exemple #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));
 }
 public void Update(Arac model)
 {
     using (AracRepository aracRepo = new AracRepository())
     {
         try
         {
             aracRepo.Update(model);
         }
         catch (Exception ex)
         {
             throw;
         }
     }
 }
Exemple #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);
     }
 }
 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);
     }
 }