예제 #1
0
        private void Kaydet_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(musteri.Text))
            {
                errorProvider1.SetError(musteri, "Müşteri Seçiniz !");
            }
            else if (string.IsNullOrWhiteSpace(Personel.Text))
            {
                errorProvider1.SetError(Personel, "Personel Seçiniz !");
            }
            else if (string.IsNullOrWhiteSpace(ucret.Text))
            {
                errorProvider1.SetError(ucret, "Toplam ücreti giriniz !");
            }
            else
            {
                DateTime        tarih = DateTime.Now;
                MySqlConnection baglanti;
                SqlBaglanti     baglan = new SqlBaglanti();
                baglanti = baglan.baglanti();

                MySqlCommand ekle = new MySqlCommand("insert into Baski (MusAdSoy,PerAdSoy,KartonCer,PlastikCer,LuksCer,UcretsizCer,ToplamBaski,Ucret,Tarih,AjansID) values ('" + musteri.Text + "','" + Personel.Text + "','" + karton.Text + "','" + plastik.Text + "','" + luks.Text + "','" + ucretsiz.Text + "','" + toplam.Text + "','" + ucret.Text + "','" + tarih.ToString() + "','" + Form1.ajansID + "') ", baglanti);
                ekle.ExecuteNonQuery();
                baglanti.Close();
                MessageBox.Show("Kayıt Başarılı !");
                errorProvider1.Clear();
                DialogResult uyari = MessageBox.Show("Kaydedilen Baskıyı Görüntülemek istermisiniz ?", "Uyarı !", MessageBoxButtons.YesNo);
                if (uyari == DialogResult.Yes)
                {
                    BaskiGoruntule gor = new BaskiGoruntule();
                    gor.Show();
                    this.Close();
                }
                else
                {
                    this.Close();
                }
            }
        }
예제 #2
0
        private void baskiGoruntuleToolStripMenuItem_Click(object sender, EventArgs e)
        {
            BaskiGoruntule baskigoruntu = new BaskiGoruntule();

            baskigoruntu.Show();
        }