Example #1
0
 public bool Yorum_Update(Yorumlar a)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope())
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 Yorumlar yy = sb.Yorumlar.First(x => x.Yorum_ID == a.Yorum_ID);
                 yy.Yorum_ID        = a.Yorum_ID;
                 yy.Kullanici_ID    = a.Kullanici_ID;
                 yy.Yetkili_ID      = a.Yetkili_ID;
                 yy.YorumDesc       = a.YorumDesc;
                 yy.Likee           = a.Likee;
                 yy.Tarih           = a.Tarih;
                 yy.Adres_ID        = a.Adres_ID;
                 yy.IstekSikayet_ID = a.IstekSikayet_ID;
                 yy.foto_id         = a.foto_id;
                 yy.video_id        = a.video_id;
                 yy.SosMedyaEkip_ID = a.SosMedyaEkip_ID;
                 yy.Onay_Durum      = a.Onay_Durum;
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch
     {
         return(false);
     }
     return(true);
 }
Example #2
0
 public bool Yorum_Delete(Yorumlar a)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope())
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 Yorumlar ss = sb.Yorumlar.FirstOrDefault(x => x.Yorum_ID == a.Yorum_ID);
                 sb.Yorumlar.Remove(ss);
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch
     {
         return(false);
     }
     return(true);
 }