Esempio n. 1
0
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            bag.Open();
            sfrno   = dataGridView1.Rows[e.RowIndex].Cells["SeferNo"].Value.ToString();
            sfrtrh1 = sefertarihi.SelectionStart.Year.ToString() + "-" + sefertarihi.SelectionStart.Month.ToString() + "-" + sefertarihi.SelectionStart.Day.ToString();
            nrdn    = nereden.Text;
            nrye    = nereye.Text;
            string     sorgu = "SELECT os.OKoltukSayisi  FROM Sefer sfr, Otobus os WHERE sfr.OtobusId=os.OtobusId AND SeferNo=@sfrno";
            SqlCommand cmd   = new SqlCommand(sorgu, bag);

            cmd.Parameters.Add("@sfrno", sfrno);

            kltksys = Convert.ToInt32(cmd.ExecuteScalar());
            if (kltksys == 54)
            {
                bag.Close();
                KoltukAra54 ka54 = new KoltukAra54();
                ka54.Show();
                this.Hide();
            }
            else if (kltksys == 46)
            {
                bag.Close();
                KoltukAra46 ka46 = new KoltukAra46();
                ka46.Show();
                this.Hide();
            }
            else if (kltksys == 78)
            {
                bag.Close();
                KoltukAra78 ka78 = new KoltukAra78();
                ka78.Show();
                this.Hide();
            }
        }
Esempio n. 2
0
 private void geri_Click(object sender, EventArgs e)
 {
     BiletSatisGiris.x = false;
     if (SeferAra.kltksys == 54)
     {
         KoltukAra54 ka54 = new KoltukAra54();
         ka54.Show();
         this.Hide();
     }
     if (SeferAra.kltksys == 46)
     {
         KoltukAra46 ka46 = new KoltukAra46();
         ka46.Show();
         this.Hide();
     }
     if (SeferAra.kltksys == 78)
     {
         KoltukAra78 ka78 = new KoltukAra78();
         ka78.Show();
         this.Hide();
     }
 }