Пример #1
0
        private void pictureBox3_Click(object sender, EventArgs e)
        {
            this.Hide();
            del d1 = new del();

            d1.Show();
        }
Пример #2
0
        private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Hide();
            del d1 = new del();

            d1.Show();
        }
Пример #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (t1.Text == "mumbai" || t1.Text == "MUMBAI")
     {
         this.Hide();
         mum m1 = new mum();
         m1.Show();
     }
     else if (t1.Text == "bangalore" || t1.Text == "BANGALORE")
     {
         this.Hide();
         bang b1 = new bang();
         b1.Show();
     }
     else if (t1.Text == "agra" || t1.Text == "AGRA")
     {
         this.Hide();
         aagra a1 = new aagra();
         a1.Show();
     }
     else if (t1.Text == "delhi" || t1.Text == "DELHI")
     {
         this.Hide();
         del d1 = new del();
         d1.Show();
     }
     else if (t1.Text == "kanyakumari" || t1.Text == "KANYAKUMARI")
     {
         this.Hide();
         kan kk1 = new kan();
         kk1.Show();
     }
     else if (t1.Text == "jaipur" || t1.Text == "JAIPUR")
     {
         this.Hide();
         jai j1 = new jai();
         j1.Show();
     }
     else if (t1.Text == "jammu" || t1.Text == "JAMMU")
     {
         this.Hide();
         kashmir j1 = new kashmir();
         j1.Show();
     }
     else if (t1.Text == "kolkata" || t1.Text == "KOLKATA")
     {
         this.Hide();
         kol k1 = new kol();
         k1.Show();
     }
     else
     {
         string           connetionString = "Provider=OraOLEDB.Oracle;Data Source=orcl;User Id=system;Password=7608956;";
         string           sql             = "SELECT * FROM search";
         OleDbConnection  connection      = new OleDbConnection(connetionString);
         OleDbDataAdapter dataadapter     = new OleDbDataAdapter(sql, connection);
         DataSet          ds = new DataSet();
         connection.Open();
         dataadapter.Fill(ds, "search");
         if (t1.Text == "")
         {
             MessageBox.Show("Enter a city name");
         }
         else
         {
             MessageBox.Show("sorry,we don't serve this city yet");
             string sql1 = "Insert into search VALUES ('" + t1.Text + "')";
             dataadapter.InsertCommand = new OleDbCommand(sql1, connection);
             dataadapter.InsertCommand.ExecuteNonQuery();
             dataadapter.Fill(ds, "search");
             connection.Close();
         }
         ClearControls();
     }
 }