コード例 #1
0
        public bool Video_Insert(Video vd)
        {
            try
            {
                using (TransactionScope ts = new TransactionScope())
                {
                    using (SobelediyeEntities sb = new SobelediyeEntities())
                    {
                        Video vv = new Video();
                        vv.Video_ID        = vd.Video_ID;
                        vv.Video_Location  = vd.Video_Location;
                        vv.IstekSikayet_ID = vd.IstekSikayet_ID;
                        vv.Video_Link      = vd.Video_Link;
                        vv.Kullanici_ID    = vd.Kullanici_ID;
                        vv.SosMedya_ID     = vd.SosMedya_ID;
                        vv.OnayDurum       = vd.OnayDurum;
                        sb.Video.Add(vv);
                        sb.SaveChanges();
                        ts.Complete();
                    }
                }
            }
            catch (SystemException ex)
            {
                return(false);
            }



            return(true);
        }
コード例 #2
0
 public bool Video_Update(Video vd)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope())
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 Video vv = sb.Video.First(x => x.Video_ID == vd.Video_ID);
                 vv.Video_ID        = vd.Video_ID;
                 vv.Video_Location  = vd.Video_Location;
                 vv.IstekSikayet_ID = vd.IstekSikayet_ID;
                 vv.Video_Link      = vd.Video_Link;
                 vv.Kullanici_ID    = vd.Kullanici_ID;
                 vv.SosMedya_ID     = vd.SosMedya_ID;
                 vv.OnayDurum       = vd.OnayDurum;
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch
     {
         return(false);
     }
     return(true);
 }
コード例 #3
0
 public bool adres_Update(Adres usr)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope())
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 Adres adres = sb.Adres.First(x => x.AdresID == usr.AdresID);
                 adres.AdresID      = usr.AdresID;
                 adres.Kullanici_ID = usr.Kullanici_ID;
                 adres.Il_ID        = usr.Il_ID;
                 adres.AcikAdres    = usr.AcikAdres;
                 adres.IlceID       = usr.IlceID;
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch
     {
         return(false);
     }
     return(true);
 }
コード例 #4
0
 public bool Foto_Update(Foto a)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope()) //linq ile where primary key'de sql transaction (türleri) scope transaction türleri read commit dirty data darboğaz nedir kullandığın transaction scope'u bil
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 Foto pic = sb.Foto.FirstOrDefault(x => x.Foto_ID == a.Foto_ID);
                 pic.Foto_ID          = a.Foto_ID;
                 pic.Foto_Location_ID = a.Foto_Location_ID;
                 pic.Kullanici_ID     = a.Kullanici_ID;
                 pic.SosMedyaEkip_ID  = a.SosMedyaEkip_ID;
                 pic.IstekSikayet_ID  = a.IstekSikayet_ID;
                 pic.Foto_Link        = a.Foto_Link;
                 pic.OnayDurum        = a.OnayDurum;
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch (SystemException ex)
     {
         return(false);
     }
     return(true);
 }
コード例 #5
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);
 }
コード例 #6
0
        public bool Birim_Insert(Birim a)
        {
            try
            {
                using (TransactionScope ts = new TransactionScope())
                {
                    using (SobelediyeEntities sb = new SobelediyeEntities())
                    {
                        Birim bb = new Birim();
                        bb.Birim_ID       = a.Birim_ID;
                        bb.Info           = a.Info;
                        bb.Cevap          = a.Cevap;
                        bb.Yon_ID         = a.Yon_ID;
                        bb.SosMedyaYet_ID = a.SosMedyaYet_ID;
                        sb.Birim.Add(bb);
                        sb.SaveChanges();
                        ts.Complete();
                    }
                }
            }
            catch (SystemException ex)
            {
                return(false);
            }



            return(true);
        }
コード例 #7
0
 public bool SosMedEkip_Update(SosyalMedyaEkibi a)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope())
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 SosyalMedyaEkibi sme = sb.SosyalMedyaEkibi.FirstOrDefault(x => x.YetkiliID == a.YetkiliID);
                 sme.YetkiliID = a.YetkiliID;
                 sme.Ad        = a.Ad;
                 sme.Soyad     = a.Soyad;
                 sme.Email     = a.Email;
                 sme.Telefon   = a.Telefon;
                 sme.Nick      = a.Nick;
                 sme.Cevap     = a.Cevap;
                 sme.Yon_ID    = a.Yon_ID;
                 sme.Evrak_ID  = a.Evrak_ID;
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch
     {
         return(false);
     }
     return(true);
 }
コード例 #8
0
        public bool SosMedEkip_Insert(SosyalMedyaEkibi a)
        {
            try
            {
                using (TransactionScope ts = new TransactionScope())
                {
                    using (SobelediyeEntities sb = new SobelediyeEntities())
                    {
                        SosyalMedyaEkibi sme = new SosyalMedyaEkibi();
                        sme.YetkiliID = a.YetkiliID;
                        sme.Ad        = a.Ad;
                        sme.Soyad     = a.Soyad;
                        sme.Email     = a.Email;
                        sme.Telefon   = a.Telefon;
                        sme.Nick      = a.Nick;
                        sme.Cevap     = a.Cevap;
                        sme.Yon_ID    = a.Yon_ID;
                        sme.Evrak_ID  = a.Evrak_ID;
                        sb.SosyalMedyaEkibi.Add(sme);
                        sb.SaveChanges();
                        ts.Complete();
                    }
                }
            }
            catch (SystemException ex)
            {
                return(false);
            }



            return(true);
        }
コード例 #9
0
 public bool Yorum_Update(Mesajlar a)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope())
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 Mesajlar ms = sb.Mesajlar.First(x => x.Mesaj_ID == a.Mesaj_ID);
                 ms.Mesaj_ID           = a.Mesaj_ID;
                 ms.Kullanici_ID       = a.Kullanici_ID;
                 ms.SosMedyaYetkili_ID = a.SosMedyaYetkili_ID;
                 ms.Konu  = a.Konu;
                 ms.Desc  = a.Desc;
                 ms.Tarih = a.Tarih;
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch
     {
         return(false);
     }
     return(true);
 }
コード例 #10
0
 public bool EvrakYon_Insert(Evrak_Yon a)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope())
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 Evrak_Yon ey = new Evrak_Yon();
                 ey.Yon_ID   = a.Yon_ID;
                 ey.Evrak_ID = a.Evrak_ID;
                 ey.DurumID  = a.DurumID;
                 ey.Aciklama = a.Aciklama;
                 ey.Tarih    = a.Tarih;
                 sb.Evrak_Yon.Add(ey);
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch (SystemException ex)
     {
         return(false);
     }
     return(true);
 }
コード例 #11
0
 public bool adres_Insert(Adres usr)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope())
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 Adres adres = new Adres();
                 adres.AdresID      = usr.AdresID;
                 adres.Kullanici_ID = usr.Kullanici_ID;
                 adres.Il_ID        = usr.Il_ID;
                 adres.AcikAdres    = usr.AcikAdres;
                 adres.IlceID       = usr.IlceID;
                 sb.Adres.Add(adres);
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch (SystemException)
     {
         return(false);
     }
     return(true);
 }
コード例 #12
0
 public bool Evrak_Update(Evrak a)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope()) //linq ile where primary key'de sql transaction (türleri) scope transaction türleri read commit dirty data darboğaz nedir kullandığın transaction scope'u bil
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 Evrak edm = sb.Evrak.FirstOrDefault(x => x.EvrakID == a.EvrakID);
                 edm.EvrakID      = a.EvrakID;
                 edm.Desc         = a.Desc;
                 edm.Baslik       = a.Baslik;
                 edm.Tur          = a.Tur;
                 edm.Tarih        = a.Tarih;
                 edm.Kullanici_ID = a.Kullanici_ID;
                 edm.Adres_ID     = a.Adres_ID;
                 edm.Istek_ID     = a.Istek_ID;
                 edm.Foto_ID      = a.Foto_ID;
                 edm.Video_ID     = a.Video_ID;
                 edm.Yon_ID       = a.Yon_ID;
                 edm.Durum_ID     = a.Durum_ID;
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch (SystemException ex)
     {
         return(false);
     }
     return(true);
 }
コード例 #13
0
 public bool Kullanici_Update(Kullanici usr)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope())
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 Kullanici kl = sb.Kullanici.First(x => x.Kullanici_ID == usr.Kullanici_ID);
                 kl.Kullanici_ID = usr.Kullanici_ID;
                 kl.Ad           = usr.Ad;
                 kl.Soyad        = usr.Soyad;
                 kl.Sifre        = usr.Sifre;
                 kl.Email        = usr.Email;
                 kl.Telefon      = usr.Telefon;
                 kl.Adres_id     = usr.Adres_id;
                 kl.EvrakID      = usr.EvrakID;
                 kl.Istek_ID     = usr.Istek_ID;
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch
     {
         return(false);
     }
     return(true);
 }
コード例 #14
0
 public bool IstekSikayet_Update(IstekSikayet a)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope())
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 IstekSikayet ist = sb.IstekSikayet.FirstOrDefault(x => x.Istek_ID == a.Istek_ID);
                 ist.Istek_ID      = a.Istek_ID;
                 ist.SosYetkili_ID = a.SosYetkili_ID;
                 ist.Kullanıcı_ID  = a.Kullanıcı_ID;
                 ist.Konu          = a.Konu;
                 ist.Desc          = a.Desc;
                 ist.Tarih         = a.Tarih;
                 ist.Turu          = a.Turu;
                 ist.Yayinlansinmi = a.Yayinlansinmi;
                 ist.Onay_Durum    = a.Onay_Durum;
                 ist.Adres_ID      = a.Adres_ID;
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch
     {
         return(false);
     }
     return(true);
 }
コード例 #15
0
 public bool Mesajlar_Insert(Mesajlar a)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope()) //linq ile where primary key'de sql transaction (türleri) scope transaction türleri read commit dirty data darboğaz nedir kullandığın transaction scope'u bil
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 Mesajlar ms = new Mesajlar();
                 ms.Mesaj_ID           = a.Mesaj_ID;
                 ms.Kullanici_ID       = a.Kullanici_ID;
                 ms.SosMedyaYetkili_ID = a.SosMedyaYetkili_ID;
                 ms.Konu  = a.Konu;
                 ms.Desc  = a.Desc;
                 ms.Tarih = a.Tarih;
                 sb.Mesajlar.Add(ms);
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch (SystemException ex)
     {
         return(false);
     }
     return(true);
 }
コード例 #16
0
 public bool IstekSikayet_Insert(IstekSikayet a)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope())
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 IstekSikayet ist = new IstekSikayet();
                 ist.Istek_ID      = a.Istek_ID;
                 ist.SosYetkili_ID = a.SosYetkili_ID;
                 ist.Kullanıcı_ID  = a.Kullanıcı_ID;
                 ist.Konu          = a.Konu;
                 ist.Desc          = a.Desc;
                 ist.Tarih         = a.Tarih;
                 ist.Turu          = a.Turu;
                 ist.Yayinlansinmi = a.Yayinlansinmi;
                 ist.Onay_Durum    = a.Onay_Durum;
                 ist.Adres_ID      = a.Adres_ID;
                 sb.IstekSikayet.Add(ist);
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch (SystemException ex)
     {
         return(false);
     }
     return(true);
 }
コード例 #17
0
 public bool EvrakYon_Update(Evrak_Yon a)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope()) //linq ile where primary key'de sql transaction (türleri) scope transaction türleri read commit dirty data darboğaz nedir kullandığın transaction scope'u bil
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 Evrak_Yon ey = sb.Evrak_Yon.FirstOrDefault(x => x.Yon_ID == a.Yon_ID);
                 ey.Yon_ID   = a.Yon_ID;
                 ey.Evrak_ID = a.Evrak_ID;
                 ey.DurumID  = a.DurumID;
                 ey.Aciklama = a.Aciklama;
                 ey.Tarih    = a.Tarih;
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch (SystemException ex)
     {
         return(false);
     }
     return(true);
 }
コード例 #18
0
 public bool Birim_Update(Birim a)
 {
     try
     {
         using (TransactionScope ts = new TransactionScope())
         {
             using (SobelediyeEntities sb = new SobelediyeEntities())
             {
                 Birim bb = sb.Birim.FirstOrDefault(x => x.Birim_ID == a.Birim_ID);
                 bb.Birim_ID       = a.Birim_ID;
                 bb.Info           = a.Info;
                 bb.Cevap          = a.Cevap;
                 bb.Yon_ID         = a.Yon_ID;
                 bb.SosMedyaYet_ID = a.SosMedyaYet_ID;
                 sb.SaveChanges();
                 ts.Complete();
             }
         }
     }
     catch (SystemException ex)
     {
         return(false);
     }
     return(true);
 }
コード例 #19
0
        public bool Kullanici_Insert(Kullanici usr)
        {
            try
            {
                using (TransactionScope ts = new TransactionScope())
                {
                    using (SobelediyeEntities sb = new SobelediyeEntities())
                    {
                        Kullanici kl = new Kullanici();
                        kl.Kullanici_ID = usr.Kullanici_ID;
                        kl.Ad           = usr.Ad;
                        kl.Soyad        = usr.Soyad;
                        kl.Sifre        = usr.Sifre;
                        kl.Email        = usr.Email;
                        kl.Telefon      = usr.Telefon;
                        kl.Adres_id     = usr.Adres_id;
                        kl.EvrakID      = usr.EvrakID;
                        kl.Istek_ID     = usr.Istek_ID;
                        sb.Kullanici.Add(kl);
                        sb.SaveChanges();
                        ts.Complete();
                    }
                }
            }
            catch (SystemException ex)
            {
                return(false);
            }


            return(true);
        }
コード例 #20
0
 public List <SosyalMedyaEkibi> Getir()
 {
     using (SobelediyeEntities sb = new SobelediyeEntities())
     {
         List <SosyalMedyaEkibi> getir = (from x in sb.SosyalMedyaEkibi
                                          select x).ToList();
         return(getir);
     }
 }
コード例 #21
0
 public List <IstekSikayet> Getir()
 {
     using (SobelediyeEntities sb = new SobelediyeEntities())
     {
         List <IstekSikayet> getir = (from x in sb.IstekSikayet
                                      select x).ToList();
         return(getir);
     }
 }
コード例 #22
0
 public List <Birim> Getir()
 {
     using (SobelediyeEntities sb = new SobelediyeEntities())
     {
         List <Birim> getir = (from x in sb.Birim
                               select x).ToList();
         return(getir);
     }
 }
コード例 #23
0
 public List <Video> Getir()
 {
     using (SobelediyeEntities sb = new SobelediyeEntities())
     {
         List <Video> getir = (from x in sb.Video
                               select x).ToList();
         return(getir);
     }
 }
コード例 #24
0
 public List <Evrak> Getir()
 {
     using (SobelediyeEntities sb = new SobelediyeEntities())
     {
         List <Evrak> getir = (from x in sb.Evrak
                               select x).ToList();
         return(getir);
     }
 }
コード例 #25
0
 public List <Kullanici> KullaniciGetir()
 {
     using (SobelediyeEntities sb = new SobelediyeEntities())
     {
         List <Kullanici> getir = (from x in sb.Kullanici
                                   select x).ToList();
         return(getir);
     }
 }
コード例 #26
0
 public List <Mesajlar> Getir()
 {
     using (SobelediyeEntities sb = new SobelediyeEntities())
     {
         List <Mesajlar> getir = (from x in sb.Mesajlar
                                  select x).ToList();
         return(getir);
     }
 }
コード例 #27
0
 public List <Kullanici> PriKullanici(int y) // primary key'leri çağır
 {
     using (SobelediyeEntities sb = new SobelediyeEntities())
     {
         List <Kullanici> getir = (from x in sb.Kullanici
                                   where x.Kullanici_ID == y
                                   select x).ToList();
         return(getir);
     }
 }
コード例 #28
0
 public List <Evrak> PriGetir(int y) // primary key'leri çağır
 {
     using (SobelediyeEntities sb = new SobelediyeEntities())
     {
         List <Evrak> getir = (from x in sb.Evrak
                               where x.EvrakID == y
                               select x).ToList();
         return(getir);
     }
 }
コード例 #29
0
 public List <Mesajlar> PriGetir(int y) // primary key'leri çağır
 {
     using (SobelediyeEntities sb = new SobelediyeEntities())
     {
         List <Mesajlar> getir = (from x in sb.Mesajlar
                                  where x.Mesaj_ID == y
                                  select x).ToList();
         return(getir);
     }
 }
コード例 #30
0
 public List <SosyalMedyaEkibi> PriGetir(int y) // primary key'leri çağır
 {
     using (SobelediyeEntities sb = new SobelediyeEntities())
     {
         List <SosyalMedyaEkibi> getir = (from x in sb.SosyalMedyaEkibi
                                          where x.YetkiliID == y
                                          select x).ToList();
         return(getir);
     }
 }