Ejemplo n.º 1
0
 // PUT: api/Sirket/5
 public IHttpActionResult Put(Sirket sirket)
 {
     using (var SirketBusiness = new SirketBusiness())
     {
         SirketBusiness.UpdateSirket(sirket);
         return(null);
     }
 }
 private bool UpdateSirket(int id, int sirketpuan, string sirketad, string sirketadres, int yoneticisi)
 {
     try
     {
         using (var SirketBussines = new SirketBusiness())
         {
             return(SirketBussines.UpdateSirket(new Sirket()
             {
                 SirketID = id,
                 SirketPuan = sirketpuan,
                 SirketAd = sirketad,
                 SirketAdres = sirketadres,
                 Yoneticisi = yoneticisi
             }));
         }
     }
     catch (Exception ex)
     {
         LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true);
         throw new Exception("Sirket doesn't exists.");
     }
 }