Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Toptancilar toptancilar = new Toptancilar();

            toptancilar.Show();
            this.Hide();
        }
        private void ToptanciBorcEkleme_Load(object sender, EventArgs e)
        {
            Toptancilar toptancilar = new Toptancilar();
            DataTable   table       = new DataTable();

            table         = baglanti.verileriOku("select *  from toptancilar where toptanci_id=" + toptanci_id);
            textBox1.Text = table.Rows[0][1].ToString();
            textBox2.Text = table.Rows[0][10].ToString();
            textBox3.Text = DateTime.Now.ToString();
        }
        private void ToptanciOdemesi_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);
            Toptancilar toptancilar = new Toptancilar();
            DataTable   table       = new DataTable();

            table         = baglanti.verileriOku("select *  from toptancilar where toptanci_id=" + toptanci_id);
            textBox1.Text = table.Rows[0][1].ToString();
            textBox2.Text = table.Rows[0][10].ToString();
            textBox3.Text = DateTime.Now.ToString();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            Toptancilar toptancilar = (Toptancilar)Application.OpenForms["Toptancilar"];

            baglanti.sqlCalistir("update toptancilar set toptanci_alacak=toptanci_alacak-'" + Convert.ToDouble(textBox4.Text) + "' where toptanci_id=" + toptanci_id);
            baglanti.verileriTablodaGoster("select * from toptancilar where toptanci_id<>1 order by toptanci_id", toptancilar.dataGridView1);
            string cari_hesap_adi = baglanti.verileriOku("select * from toptancilar where toptanci_id=" + toptanci_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,toptanci_id) values(1,2,1,2,'" + DateTime.Now + "','" + textBox4.Text + "','" + cari_hesap_adi + "'," + ana_menu.kullanici_kodu + "," + toptanci_id + ")");
            MessageBox.Show("Toptancıya ödeme yapıldı", "Başarılı", MessageBoxButtons.OK);
            this.Hide();
        }
        private void btnGuncelle_Click(object sender, EventArgs e)
        {
            Toptancilar toptancilar = (Toptancilar)Application.OpenForms["Toptancilar"];

            baglanti.sqlCalistir("update toptancilar set " +
                                 "toptanci_adi='" + txtToptanciAdi.Text + "'," +
                                 "sirket_yetkilisi='" + txtSirketYetkilisi.Text + "'," +
                                 "email='" + txtEmail.Text + "'," +
                                 "internet_adresi='" + txtInternetAdresi.Text + "'," +
                                 "vergi_dairesi='" + txtVergiDairesi.Text + "'," +
                                 "vergi_no='" + txtVergiNo.Text + "'," +
                                 "adres='" + txtAdres.Text + "'," +
                                 "telefon='" + txtTelefon.Text + "'," +
                                 "notlar='" + txtNotlar.Text + "'," +
                                 "toptanci_alacak='" + txtBorc.Text + "'" +
                                 " where toptanci_id=" + toptanci_id);
            baglanti.verileriTablodaGoster("select toptanci_id,toptanci_adi,format(toptanci_alacak,'Currency') as toptanci_alacak from toptancilar where toptanci_id<>1", toptancilar.dataGridView1);
            MessageBox.Show("GÜncelleme başarıyla gerçekleşti!", "Başarılı", MessageBoxButtons.OK);
            this.Hide();
        }
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            Toptancilar toptancilar = (Toptancilar)Application.OpenForms["Toptancilar"];

            baglanti.sqlCalistir("insert into toptancilar (toptanci_adi,sirket_yetkilisi,email,internet_adresi,vergi_dairesi,vergi_no,adres,telefon,notlar,kayit_tarihi,toptanci_alacak) values ('"
                                 + txtToptanciAdi.Text + "','" + txtSirketYetkilisi.Text + "','" + txtEmail.Text + "','" + txtInternetAdresi.Text + "','" + txtVergiDairesi.Text + "','" + txtVergiNo.Text + "','"
                                 + txtAdres.Text + "','" + txtTelefon.Text + "','" + txtNotlar.Text + "','" + DateTime.Now + "','" + txtBorc.Text + "')");

            baglanti.verileriTablodaGoster("select toptanci_id,toptanci_adi,format(toptanci_alacak,'Currency') as toptanci_alacak from toptancilar where toptanci_id<>1", toptancilar.dataGridView1);
            MessageBox.Show("Kayıt başarıyla gerçekleşti!", "Başarılı", MessageBoxButtons.OK);
            this.Hide();
            //foreach (Control item in this.Controls) // textboxları temizle
            //{
            //    if (item is TextBox)
            //    {
            //        TextBox tbox = (TextBox)item;
            //        tbox.Clear();
            //    }
            //}
        }
Exemple #7
0
        private void toolStripButton5_Click(object sender, EventArgs e)
        {
            Toptancilar toptancilar = new Toptancilar();

            toptancilar.Show();
        }