コード例 #1
0
        //Yeni cari ekleme sayfası açılıyor......

        //Cari kartını silmek için butona tıklanınca çalışacak metod.
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult sorgu = MessageBox.Show("Seçili hesabı (" + dataGridView1.SelectedRows[0].Cells[1].Value.ToString() + ") silmek istediğinize emin misiniz?", "Dikkat", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (DialogResult.Yes == sorgu)
                {
                    baglanti.Open();

                    OleDbCommand komut2 = new OleDbCommand("DELETE FROM Veresiyeler WHERE CariNo=" + dataGridView1.SelectedRows[0].Cells[0].Value, baglanti);
                    komut2.ExecuteNonQuery();

                    OleDbCommand komut = new OleDbCommand("DELETE FROM CariHesap WHERE CariNo=" + dataGridView1.SelectedRows[0].Cells[0].Value, baglanti);
                    komut.ExecuteNonQuery();
                    baglanti.Close();

                    dataGridDoldur("Select * From CariHesap");

                    MesajKutusu m = new MesajKutusu();
                    m.labelControl1.Text   = dataGridView1.SelectedRows[0].Cells[1].Value.ToString() + " isimli cari hesabını silme işlemi başarılı.";
                    m.pictureEdit2.Visible = true;
                    m.ShowDialog();
                }
            }
            catch (Exception)
            {
                baglanti.Close();

                MesajKutusu m = new MesajKutusu();
                m.labelControl1.Text   = "Hata oluştu. Lütfen tekrar deneyiniz. Seçili bir cari hesap yoksa lütfen bir cari hesap seçiniz.";
                m.pictureEdit1.Visible = true;
                m.ShowDialog();
            }
        }
コード例 #2
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult sorgu = MessageBox.Show("Seçili e-postayı silmek istediğinize emin misiniz?", "Dikkat", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (sorgu == DialogResult.Yes)
                {
                    baglanti.Open();
                    OleDbCommand komut = new OleDbCommand("DELETE FROM GidenEposta WHERE GidenEpostaNo=" + dataGridView1.SelectedRows[0].Cells[0].Value, baglanti);
                    komut.ExecuteNonQuery();
                    baglanti.Close();

                    dataGridDoldur();
                }
            }
            catch (Exception hata)
            {
                baglanti.Close();

                MesajKutusu m = new MesajKutusu();
                m.labelControl1.Text   = "Lütfen bir e-posta seçiniz. Hata detayı: " + hata.Message;
                m.pictureEdit1.Visible = true;
                m.ShowDialog();
            }
        }
コード例 #3
0
        private void gidenKutusuToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            MesajKutusu m = new MesajKutusu();

            m.labelControl1.Text   = "Bu özellik şu anda aktif değil.";
            m.pictureEdit1.Visible = true;
            m.ShowDialog();
        }
コード例 #4
0
        private void simpleButton9_Click(object sender, EventArgs e)
        {
            try
            {
                if (textEdit1.Text != "" && textEdit2.Text != "" && textEdit3.Text != "")
                {
                    baglanti.Open();
                    if (durum == 0)
                    {
                        OleDbCommand komu = new OleDbCommand("INSERT INTO Veresiyeler(CariNo,CariAd,VeresiyeTarih,VeresiyeAciklama,VeresiyeTutar) VALUES(" + cariNo + ",'" + cariAd + "','" + textEdit2.Text + "','" + textEdit1.Text + "','" + textEdit3.Text + "')", baglanti);
                        komu.ExecuteNonQuery();
                    }
                    else
                    {
                        OleDbCommand komu = new OleDbCommand("INSERT INTO Veresiyeler(CariNo,CariAd,VeresiyeTarih,VeresiyeAciklama,VeresiyeTutar) VALUES(" + cariNo + ",'" + cariAd + "','" + textEdit2.Text + "','" + textEdit1.Text + "','-" + textEdit3.Text + "')", baglanti);
                        komu.ExecuteNonQuery();
                    }


                    OleDbCommand    komut2      = new OleDbCommand("Select * From Veresiyeler Where CariNo=" + cariNo, baglanti);
                    OleDbDataReader oku         = komut2.ExecuteReader();
                    double          genelToplam = 0;
                    while (oku.Read())
                    {
                        genelToplam += Convert.ToDouble(oku["VeresiyeTutar"]);
                    }
                    oku.Dispose();
                    OleDbCommand komut3 = new OleDbCommand("UPDATE CariHesap SET CariBakiye=" + genelToplam + " Where CariNo=" + cariNo, baglanti);
                    komut3.ExecuteNonQuery();

                    baglanti.Close();

                    AnaForm ana = (AnaForm)Application.OpenForms["AnaForm"];
                    ana.musteriHesabiGetir();
                    this.Close();
                }
                else
                {
                    MesajKutusu m = new MesajKutusu();
                    m.labelControl1.Text   = "Lütfen tüm bilgileri doldurunuz.";
                    m.pictureEdit1.Visible = true;
                    m.ShowDialog();
                }
            }
            catch (Exception hata)
            {
                baglanti.Close();
                MessageBox.Show(hata.Message);
            }
        }
コード例 #5
0
        private void simpleButton5_Click(object sender, EventArgs e)
        {
            baglanti.Open();
            OleDbCommand komut = new OleDbCommand("INSERT INTO BankaHesaplari(BankaAd,BankaIBAN,BankaHesapNo,BankaTuru) VALUES('" + textEdit1.Text + "','" + textEdit2.Text + "','" + textEdit3.Text + "','" + textEdit4.Text + "')", baglanti);

            komut.ExecuteNonQuery();
            baglanti.Close();

            bankaHesaplariGetir();

            MesajKutusu m = new MesajKutusu();

            m.labelControl1.Text   = "Banka hesabı kayıt işlemi başarılı.";
            m.pictureEdit2.Visible = true;
            m.ShowDialog();
        }
コード例 #6
0
        //Yenileme işlemi yapılıyor.

        //E-posta gönderme işlemi yapılıyor.
        private void simpleButton6_Click(object sender, EventArgs e)
        {
            try
            {
                EpostaGonder ee = new EpostaGonder();
                ee.aliciKisi = dataGridView1.SelectedRows[0].Cells[7].Value.ToString();
                ee.ShowDialog();
            }
            catch (Exception)
            {
                MesajKutusu m = new MesajKutusu();
                m.labelControl1.Text   = "Direk e-posta gönderim yolunu tercih edecekseniz bir cari hesabı seçmek zorundasınız.";
                m.pictureEdit1.Visible = true;
                m.ShowDialog();
            }
        }
コード例 #7
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            try
            {
                if (textEdit2.Text != "" && textEdit3.Text != "" && textEdit4.Text != "")
                {
                    baglanti.Open();
                    OleDbCommand komut = new OleDbCommand("INSERT INTO CariHesap(CariAd,CariIsTel,CariCepTel,CariAdres,CariIl,CariIlce,CariEposta,CariKayitTarih,CariNot,CariBakiye) VALUES(@CariAd,@CariIsTel,@CariCepTel,@CariAdres,@CariIl,@CariIlce,@CariEposta,@CariKayitTarih,@CariNot,@CariBakiye)", baglanti);
                    komut.Parameters.AddWithValue("@CariAd", textEdit2.Text);
                    komut.Parameters.AddWithValue("@CariIsTel", textEdit3.Text);
                    komut.Parameters.AddWithValue("@CariCepTel", textEdit4.Text);
                    komut.Parameters.AddWithValue("@CariAdres", textEdit5.Text);
                    komut.Parameters.AddWithValue("@CariIl", textEdit6.Text);
                    komut.Parameters.AddWithValue("@CariIlce", textEdit7.Text);
                    komut.Parameters.AddWithValue("@CariEposta", textEdit8.Text);
                    komut.Parameters.AddWithValue("@CariKayitTarih", textEdit9.Text);
                    komut.Parameters.AddWithValue("@CariNot", richTextBox1.Text);
                    komut.Parameters.AddWithValue("@CariBakiye", 0);
                    komut.ExecuteNonQuery();
                    baglanti.Close();


                    temizle();

                    MesajKutusu m = new MesajKutusu();
                    m.labelControl1.Text   = "Kayıt işlemi başarılı.";
                    m.pictureEdit2.Visible = true;
                    m.ShowDialog();
                }
                else
                {
                    MesajKutusu m = new MesajKutusu();
                    m.labelControl1.Text   = "Ad-soyad ve telefon bilgileri gereklidir. Boş geçilemez.";
                    m.pictureEdit1.Visible = true;
                    m.ShowDialog();
                }
            }
            catch (Exception)
            {
                baglanti.Close();
                MesajKutusu m = new MesajKutusu();
                m.labelControl1.Text   = "Hata oluştu. Lütfen tekrar deneyiniz.";
                m.pictureEdit1.Visible = true;
                m.ShowDialog();
            }
        }
コード例 #8
0
 private void simpleButton15_Click(object sender, EventArgs e)
 {
     if (kullaniciAd == textEdit1.Text && kullaniciSifre == textEdit2.Text)
     {
         AnaForm a = (AnaForm)Application.OpenForms["AnaForm"];
         a.acilisDurum = true;
         a.acilisKontrolEt();
         this.Close();
     }
     else
     {
         MesajKutusu m = new MesajKutusu();
         m.labelControl1.Text   = "Kullanıcı adı veya parola hatalı!";
         m.pictureEdit1.Visible = true;
         m.ShowDialog();
     }
 }
コード例 #9
0
        //Cari kartını silmek için butona tıklanınca çalışacak metod.



///////////////////////////// PANEL 2 İŞLEMLERİ //////////////////////////////////////////////



        //İstatistik butonu aktif ediliyor.(PANEL2)
        private void simpleButton13_Click(object sender, EventArgs e)
        {
            try
            {
                Istatistik ı = new Istatistik();
                ı.cariNo = Convert.ToInt32(dataGridView2.SelectedRows[0].Cells[1].Value);
                ı.ShowDialog();
            }
            catch (Exception)
            {
                MesajKutusu m = new MesajKutusu();
                m.labelControl1.Text   = "Hesaba ait herhangi bir ve/veya birden fazla bilgi olmadan istatistik hesaplaması yapılamaz.";
                m.pictureEdit1.Visible = true;
                m.ShowDialog();
                //MessageBox.Show("Hesaba ait herhangi bir ve/veya birden fazla bilgi olmadan istatistik hesaplaması yapılamaz.","Hata",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
            }
        }
コード例 #10
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (textEditSifre.Text == textEditSifreTekrar.Text)
            {
                baglanti.Open();
                OleDbCommand komut = new OleDbCommand("UPDATE Ayarlar SET FirmaAd=@FirmaAd,FirmaAd2=@FirmaAd2,YetkiliKisi=@YetkiliKisi,IsTel=@IsTel,CepTel=@CepTel,Fax=@Fax,Adres=@Adres,Eposta=@Eposta,VergiNo=@VergiNo,Aciklama=@Aciklama,KullaniciAd=@KullaniciAd,KullaniciSifre=@KullaniciSifre,KullaniciEposta=@KullaniciEposta,GuvenlikSoru=@GuvenlikSoru,GuvenlikCevap=@GuvenlikCevap,EpostaAdres=@EpostaAdres,EpostaSifre=@EpostaSifre,SunucuAd=@SunucuAd,SunucuHost=@SunucuHost,SunucuPort=@SunucuPort,SunucuSSL=@SunucuSSL", baglanti);
                komut.Parameters.AddWithValue("@FirmaAd", textEditFirmaAd.Text);
                komut.Parameters.AddWithValue("@FirmaAd2", textEditFirmaAd2.Text);
                komut.Parameters.AddWithValue("@YetkiliKisi", textEditYetkiliKisi.Text);
                komut.Parameters.AddWithValue("@IsTel", textEditIsYeriTel.Text);
                komut.Parameters.AddWithValue("@CepTel", textEditCepTel.Text);
                komut.Parameters.AddWithValue("@Fax", textEditFax.Text);
                komut.Parameters.AddWithValue("@Adres", textEditAdres.Text);
                komut.Parameters.AddWithValue("@Eposta", textEditFirmaEposta.Text);
                komut.Parameters.AddWithValue("@VergiNo", textEditVergiNo.Text);
                komut.Parameters.AddWithValue("@Aciklama", textEditFirmaAciklama.Text);
                komut.Parameters.AddWithValue("@KullaniciAd", textEditKullaniciAd.Text);
                komut.Parameters.AddWithValue("@KullaniciSifre", textEditSifre.Text);
                komut.Parameters.AddWithValue("@KullaniciEposta", textEditEposta.Text);
                komut.Parameters.AddWithValue("@GuvenlikSoru", textEditGuvenlikSorusu.Text);
                komut.Parameters.AddWithValue("@GuvenlikCevap", textEditCevap.Text);
                komut.Parameters.AddWithValue("@EpostaAdres", textEdit1.Text);
                komut.Parameters.AddWithValue("@EpostaSifre", textEdit2.Text);
                komut.Parameters.AddWithValue("@SunucuAd", comboBoxSunucu.Text);
                komut.Parameters.AddWithValue("@SunucuHost", textEditHost.Text);
                komut.Parameters.AddWithValue("@SunucuPort", textEditPort.Text);
                komut.Parameters.AddWithValue("@SunucuSSL", textEditSSL.Text);
                komut.ExecuteNonQuery();
                baglanti.Close();

                MesajKutusu m = new MesajKutusu();
                m.labelControl1.Text   = "Ayar güncelleme işlemi başarılı.";
                m.pictureEdit2.Visible = true;
                m.ShowDialog();
            }
            else
            {
                baglanti.Close();

                MesajKutusu m = new MesajKutusu();
                m.labelControl1.Text   = "Şifreler aynı değil veya boş!";
                m.pictureEdit1.Visible = true;
                m.ShowDialog();
            }
        }
コード例 #11
0
        //Ödeme Ekleme İşlemi

        //Seçili bilgiyi silme işlemi.
        private void simpleButton10_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult sorgu = MessageBox.Show("Seçili bilgiyi silmek istediğinize emin misiniz?", "Dikkat", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (DialogResult.Yes == sorgu)
                {
                    baglanti.Open();
                    OleDbCommand komut = new OleDbCommand("DELETE FROM Veresiyeler WHERE VeresiyeNo=" + dataGridView2.SelectedRows[0].Cells[0].Value, baglanti);
                    komut.ExecuteNonQuery();

                    OleDbCommand    komut2      = new OleDbCommand("Select * From Veresiyeler Where CariNo=" + dataGridView1.SelectedRows[0].Cells[0].Value, baglanti);
                    OleDbDataReader oku         = komut2.ExecuteReader();
                    double          genelToplam = 0;
                    while (oku.Read())
                    {
                        genelToplam += Convert.ToDouble(oku["VeresiyeTutar"]);
                    }
                    oku.Dispose();
                    OleDbCommand komut3 = new OleDbCommand("UPDATE CariHesap SET CariBakiye=" + genelToplam + " Where CariNo=" + dataGridView1.SelectedRows[0].Cells[0].Value, baglanti);
                    komut3.ExecuteNonQuery();

                    baglanti.Close();

                    musteriHesabiGetir();

                    MesajKutusu m = new MesajKutusu();
                    m.labelControl1.Text   = "Seçili bilgiyi silme işlemi başarılı.";
                    m.pictureEdit2.Visible = true;
                    m.ShowDialog();
                }
            }
            catch (Exception)
            {
                baglanti.Close();
                MesajKutusu m = new MesajKutusu();
                m.labelControl1.Text   = "Hata oluştu. Lütfen tekrar deneyiniz. Seçili bir bilgi yoksa lütfen bir bilgi seçiniz.";
                m.pictureEdit1.Visible = true;
                m.ShowDialog();
            }
        }