private void topTenCelebLabel10_Click(object sender, EventArgs e) { DetailsHumanForm detailHuman = new DetailsHumanForm(); detailHuman.gelenH_No = topTenCelebHuman[9].getH_no().ToString(); detailHuman.ShowDialog(); }
private void findButton_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=IMDB_DB;Integrated Security=True"); SqlCommand cmd; SqlDataReader dr; string sqlString = ""; con.Open(); sqlString = "SELECT h_no,name,l_name FROM Human WHERE name=@name AND l_name=@l_name"; cmd = new SqlCommand(sqlString, con); string name, lname; int temp = searchTextBox.Text.IndexOf(" "); name = searchTextBox.Text.Substring(0, temp); temp++; lname = searchTextBox.Text.Substring(temp, searchTextBox.Text.Length - temp); cmd.Parameters.AddWithValue("@name", name); cmd.Parameters.AddWithValue("@l_name", lname); dr = cmd.ExecuteReader(); dr.Read(); if (dr.HasRows) { DetailsHumanForm detailHuman = new DetailsHumanForm(); detailHuman.gelenH_No = dr[0].ToString(); detailHuman.gelenU_No = gelenU_No; detailHuman.ShowDialog(); } else { MessageBox.Show("Aradığınız kişi bulunamadı.", "Error"); } con.Close(); }
private void topTenCelebPictureBox9_Click(object sender, EventArgs e) { DetailsHumanForm detailHuman = new DetailsHumanForm(); detailHuman.gelenH_No = topTenCelebHuman[8].getH_no().ToString(); detailHuman.gelenU_No = user.getU_No(); detailHuman.ShowDialog(); }
private void bestStarPictureBox4_Click(object sender, EventArgs e) { DetailsHumanForm detailHuman = new DetailsHumanForm(); detailHuman.gelenH_No = bestStarsInformation[3, 0]; detailHuman.gelenU_No = gelenU_No; this.Close(); detailHuman.Show(); }
private void nameLabel_Click(object sender, EventArgs e) { string h_no = ""; Label ogren = sender as Label; h_no = ogren.Name.Substring(0, ogren.Name.IndexOf("@")); DetailsHumanForm detailHuman = new DetailsHumanForm(); detailHuman.gelenH_No = h_no; detailHuman.gelenU_No = gelenU_No; detailHuman.ShowDialog(); }
private void humanPicture_Click(object sender, EventArgs e) { string h_no = ""; PictureBox ogren = sender as PictureBox; h_no = ogren.Name.Substring(0, ogren.Name.IndexOf("@")); DetailsHumanForm detailHuman = new DetailsHumanForm(); detailHuman.gelenH_No = h_no; detailHuman.gelenU_No = gelenU_No; detailHuman.ShowDialog(); }
private void findButton_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=IMDB_DB;Integrated Security=True"); SqlCommand cmd; SqlDataReader dr; string sqlString = ""; con.Open(); if (searchTypeComboBox.SelectedIndex == 1) { sqlString = "SELECT m_no,name FROM Movies WHERE name=@name"; cmd = new SqlCommand(sqlString, con); cmd.Parameters.AddWithValue("@name", searchTextBox.Text); dr = cmd.ExecuteReader(); dr.Read(); if (dr.HasRows) { DetailsMovieForm detailMovie = new DetailsMovieForm(); detailMovie.gelenM_No = dr[0].ToString(); detailMovie.gelenU_No = user.getU_No(); detailMovie.ShowDialog(); } else { MessageBox.Show("Aradığınız film bulunamadı."); } con.Close(); } else { sqlString = "SELECT h_no,name,l_name FROM Human WHERE name=@name AND l_name=@l_name"; cmd = new SqlCommand(sqlString, con); string name, lname; if (searchTextBox.TextLength < 3) { MessageBox.Show("Lütfen aranacak kişinin isim ve soyadını giriniz."); } else { int temp = searchTextBox.Text.IndexOf(" "); name = searchTextBox.Text.Substring(0, temp); temp++; lname = searchTextBox.Text.Substring(temp, searchTextBox.Text.Length - temp); cmd.Parameters.AddWithValue("@name", name); cmd.Parameters.AddWithValue("@l_name", lname); dr = cmd.ExecuteReader(); dr.Read(); if (dr.HasRows) { DetailsHumanForm detailHuman = new DetailsHumanForm(); detailHuman.gelenH_No = dr[0].ToString(); detailHuman.gelenU_No = user.getU_No(); detailHuman.ShowDialog(); } else { MessageBox.Show("Aradığınız kişi bulunamadı."); } con.Close(); } } }