Example #1
0
        private void MusteriBorcEkleme_Load(object sender, EventArgs e)
        {
            Musteriler musteriler = new Musteriler();
            DataTable  table      = new DataTable();

            table         = baglanti.verileriOku("select *  from musteriler where musteri_id=" + musteri_id);
            textBox1.Text = table.Rows[0][1].ToString();
            textBox2.Text = table.Rows[0][7].ToString();
            textBox3.Text = DateTime.Now.ToString();
        }
        private void btnGuncelle_Click(object sender, EventArgs e)
        {
            Musteriler musteriler = (Musteriler)Application.OpenForms["Musteriler"];

            baglanti.sqlCalistir("update musteriler set ad_soyad='" + textBox1.Text + "',email='" + textBox2.Text + "',telefon='" + textBox3.Text + "',adres='" +
                                 textBox4.Text + "',notlar='" + textBox5.Text + "',devreden_borc='" + textBox6.Text + "' where musteri_id=" + musteri_id);
            baglanti.verileriTablodaGoster("select musteri_id,ad_soyad,format(devreden_borc,'Currency') as devreden_borc from musteriler where musteri_id<>1 order by musteri_id", musteriler.dataGridView1);
            MessageBox.Show("Güncelleme yapıldı!", "Başarılı", MessageBoxButtons.OK);
            this.Hide();
        }
        private void MusteriOdemesi_Load(object sender, EventArgs e)
        {
            baglanti.verileriComboListele("select * from odeme_turleri where odeme_kodu in (1,2,3,4,5)", "odeme_turu", "odeme_kodu", comboBox1);
            Musteriler musteriler = new Musteriler();
            DataTable  table      = new DataTable();

            table         = baglanti.verileriOku("select *  from musteriler where musteri_id=" + musteri_id);
            textBox1.Text = table.Rows[0][1].ToString();
            textBox2.Text = table.Rows[0][7].ToString();
            textBox3.Text = DateTime.Now.ToString();
        }
        private void button1_Click(object sender, EventArgs e)  //müşteri kayıt butonu
        {
            Musteriler musteriler = (Musteriler)Application.OpenForms["Musteriler"];

            baglanti.sqlCalistir("insert into musteriler (ad_soyad,email,telefon,adres,notlar,kayit_tarihi,devreden_borc) values ('"
                                 + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "','" + DateTime.Now + "','" + textBox6.Text + "')");
            baglanti.verileriTablodaGoster("select musteri_id,ad_soyad,format(devreden_borc,'Currency') as devreden_borc from musteriler where musteri_id<>1 order by musteri_id", musteriler.dataGridView1);
            MessageBox.Show("Müşteri Kaydı Yapıldı!", "Başarılı", MessageBoxButtons.OK);
            //musteriler.Show();
            this.Hide();
        }
Example #5
0
        private void button1_Click(object sender, EventArgs e)
        {
            Musteriler musteriler = (Musteriler)Application.OpenForms["Musteriler"];

            baglanti.sqlCalistir("update musteriler set devreden_borc=devreden_borc+'" + textBox4.Text + "' where musteri_id=" + musteri_id);
            baglanti.verileriTablodaGoster("select * from musteriler where musteri_id<>1 and aktif_mi=true order by musteri_id", musteriler.dataGridView1);
            string cari_hesap_adi = baglanti.verileriOku("select * from musteriler where musteri_id=" + musteri_id).Rows[0][1].ToString();

            baglanti.sqlCalistir("insert into hareketler (hareket_turu_kodu,islem_turu_kodu,odeme_turu_kodu,urun_id,islem_tarihi,toplam_tutar,cari_hesap_adi,islemi_yapan_kullanici_kodu,musteri_id) values(2,3,1,2,'" + DateTime.Now + "','" + textBox4.Text + "','" + cari_hesap_adi + "'," + ana_menu.kullanici_kodu + "," + musteri_id + ")");
            VeresiyeDefteri veresiye_defteri = (VeresiyeDefteri)Application.OpenForms["VeresiyeDefteri"];

            if (veresiye_defteri != null)
            {
                veresiye_defteri.textBox2.Text = baglanti.verileriOku("select devreden_borc from musteriler where musteri_id=" + musteri_id).Rows[0][0].ToString();
            }
            MessageBox.Show("Borç eklendi!", "Başarılı", MessageBoxButtons.OK);
            this.Hide();
        }
Example #6
0
        private void toolStripButton6_Click(object sender, EventArgs e)
        {
            Musteriler musteriler = new Musteriler();

            musteriler.Show();
        }
Example #7
0
        private void musteriBilgileriToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Musteriler musteriler = new Musteriler();

            musteriler.Show();
        }