private void btnIsEmriAc_Click(object sender, EventArgs e)
 {
     if (musNo != 0)
     {
         String komut = "INSERT INTO servis " +
                        " (girisTarihi, sasiNo, musNo, perNo, girisTalimati, aracKm) VALUES " +
                        " ('" + dtGiris.Value.ToString("yyyyMMdd HH:mm:ss") + "', '" + tbSasiNo.Text + "', " +
                        musNo + ", " + personel.getPerNo() + ", '" + tbGirisTalimat.Text + "', " +
                        tbArackm.Text + ") SELECT SCOPE_IDENTITY()";
         SqlCommand sorgu = new SqlCommand(komut, baglanti);
         tbIsEmriNo.Text = Convert.ToInt64(sorgu.ExecuteScalar()).ToString();
     }
 }
Exemple #2
0
        private void btnSatisYap_Click(object sender, EventArgs e)
        {
            if (musNo != 0)
            {
                String komut = "INSERT INTO satis " +
                               " (tarih, sasiNo, musNo, perNo, tutar) VALUES " +
                               " ('" + dtSatis.Value.ToString("yyyyMMdd HH:mm:ss") + "', '" + tbSasiNo.Text + "', " +
                               musNo + ", " + personel.getPerNo() + ", " + tbSatisTutari.Text + ")SELECT SCOPE_IDENTITY()";
                SqlCommand sorgu = new SqlCommand(komut, baglanti);

                Int32 primaryKey = Convert.ToInt32(sorgu.ExecuteScalar());
            }
        }
Exemple #3
0
 public void kisiselDoldur()
 {
     tbPersonelNo.Text = personel.getPerNo().ToString();
     btnPersonelNoDoldur_Click(this, new EventArgs());
 }