示例#1
0
 public void Update(Musteriler kayit)
 {
     try
     {
         SqlDb db = new SqlDb(cls_settings.connectionString);
         db.Musterilers.Attach(kayit, true);
         db.SubmitChanges();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Hata oluştu: " + ex.Message, "Dikkat", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#2
0
 public void Save(Stoklar kayit)
 {
     try
     {
         SqlDb db = new SqlDb(cls_settings.connectionString);
         db.Stoklars.InsertOnSubmit(kayit);
         db.SubmitChanges();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Hata oluştu: " + ex.Message, "Dikkat", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#3
0
 public void EvrakSil(int sira, int evraktip)
 {
     try
     {
         SqlDb db    = new SqlDb(cls_settings.connectionString);
         var   kayit = (from tbl in db.StokGCs
                        where tbl.StokGCTipi == evraktip && tbl.StokGCEvrakNo == sira
                        select tbl);
         db.StokGCs.DeleteAllOnSubmit(kayit);
         db.SubmitChanges();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Hata oluştu: " + ex.Message, "Dikkat", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#4
0
 public void SatirSil(int kayitNo)
 {
     try
     {
         SqlDb db    = new SqlDb(cls_settings.connectionString);
         var   kayit = (from tbl in db.StokGCs
                        where tbl.StokGCKayitNo == kayitNo
                        select tbl);
         db.StokGCs.DeleteAllOnSubmit(kayit);
         db.SubmitChanges();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Hata oluştu: " + ex.Message, "Dikkat", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#5
0
        public void Delete(Musteriler kayit)
        {
            try
            {
                SqlDb      db     = new SqlDb(cls_settings.connectionString);
                Musteriler sKayit = db.Musterilers.SingleOrDefault(S => S.MusteriKodu == kayit.MusteriKodu);

                if (sKayit != null)
                {
                    db.Musterilers.DeleteOnSubmit(sKayit);
                    db.SubmitChanges();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Hata oluştu: " + ex.Message, "Dikkat", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#6
0
        public void Delete(StokFiyatlari kayit)
        {
            SqlDb db = new SqlDb(cls_settings.connectionString);

            try
            {
                StokFiyatlari sKayit = db.StokFiyatlaris.SingleOrDefault(S => S.StokFiyatStokKodu == kayit.StokFiyatStokKodu && S.StokFiyatNo == kayit.StokFiyatNo);

                if (sKayit != null)
                {
                    db.StokFiyatlaris.DeleteOnSubmit(sKayit);
                    db.SubmitChanges();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Hata oluştu: " + ex.Message, "Dikkat", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#7
0
        public void EvrakKaydet(StokGC Gelenkayit)
        {
            try
            {
                SqlDb db = new SqlDb(cls_settings.connectionString);

                if (Gelenkayit.StokGCKayitNo > 0)
                {
                    db.StokGCs.Attach(Gelenkayit, true);
                }
                else
                {
                    db.StokGCs.InsertOnSubmit(Gelenkayit);
                }
                db.SubmitChanges();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Hata oluştu: " + ex.Message, "Dikkat", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }