public static bool UpdateKullanicilar(Kullanicilar kk)
 {
     using (hesapEntities he = new hesapEntities())
     {
         he.Entry(kk).State = EntityState.Modified;
         if (he.SaveChanges() > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }
Beispiel #2
0
 public static bool DeleteUrun(int ID)
 {
     using (hesapEntities he = new hesapEntities())
     {
         var s = he.Urunler.Find(ID);
         he.Urunler.Remove(s);
         if (he.SaveChanges() > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }
Beispiel #3
0
 public static bool AddSatislar(SatislarModel sm)
 {
     using (hesapEntities he = new hesapEntities())
     {
         var s = ConvertToSatislar(sm);
         he.Satislar.Add(s);
         if (he.SaveChanges() > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }
Beispiel #4
0
 public static bool AddMusteri(MusterilerModel m)
 {
     using (hesapEntities he = new hesapEntities())
     {
         Musteriler musteri = ConvertToMusteriler(m);
         he.Musteriler.Add(musteri);
         if (he.SaveChanges() > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }
 public static bool DeleteKategori(int ID)
 {
     using (hesapEntities he = new hesapEntities())
     {
         var id = he.Kategoriler.Find(ID);
         he.Kategoriler.Remove(id);
         if (he.SaveChanges() > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }
Beispiel #6
0
        public static bool UpdateUrun(UrunlerModel um)
        {
            var urun = ConvertToUrunler(um);

            using (hesapEntities he = new hesapEntities())
            {
                he.Entry(urun).State = EntityState.Modified;
                if (he.SaveChanges() > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
        }
Beispiel #7
0
        public static bool AddUrun(UrunlerModel um)
        {
            var u = ConvertToUrunler(um);

            using (hesapEntities he = new hesapEntities())
            {
                he.Urunler.Add(u);
                if (he.SaveChanges() > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
        }
Beispiel #8
0
        public static bool UpdateMusteri(MusterilerModel mm)
        {
            var musteri = ConvertToMusteriler(mm);

            using (hesapEntities he = new hesapEntities())
            {
                he.Entry(musteri).State = EntityState.Modified;
                if (he.SaveChanges() > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
        }
        public static bool UpdateKategori(KategorilerModel km)
        {
            var k = ConvertToKategoriler(km);

            using (hesapEntities he = new hesapEntities())
            {
                he.Entry(k).State = EntityState.Modified;
                if (he.SaveChanges() > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
        }
        public static bool AddKategori(KategorilerModel km)
        {
            var f = ConvertToKategoriler(km);

            using (hesapEntities he = new hesapEntities())
            {
                he.Kategoriler.Add(f);
                if (he.SaveChanges() > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
        }