Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedIndex > -1)
     {
         if (searchC == 0)
         {
             UserSearchAnimes a = new UserSearchAnimes(listBox1.SelectedValue.ToString());
             this.Hide();
             a.ShowDialog();
             this.Show();
         }
         else if (searchC == 1)
         {
             UserSearchMangas a = new UserSearchMangas(listBox1.SelectedValue.ToString());
             this.Hide();
             a.ShowDialog();
             this.Show();
         }
         else if (searchC == 4)
         {
             UserSearchPublishers a = new UserSearchPublishers(listBox1.SelectedValue.ToString());
             this.Hide();
             a.ShowDialog();
             this.Show();
         }
         else if (searchC == 5)
         {
             UserSearchStudio a = new UserSearchStudio(listBox1.SelectedValue.ToString());
             this.Hide();
             a.ShowDialog();
             this.Show();
         }
         else if (searchC == 2)
         {
             UserSearchCharacters a = new UserSearchCharacters(listBox1.SelectedValue.ToString());
             this.Hide();
             a.ShowDialog();
             this.Show();
         }
         else if (searchC == 3)
         {
             UserSearchStaff a = new UserSearchStaff(listBox1.SelectedValue.ToString());
             this.Hide();
             a.ShowDialog();
             this.Show();
         }
     }
 }
Пример #2
0
        private void manga_list_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            MessageBox.Show(manga_list.SelectedRows[0].Cells[0].Value.ToString());
            UserSearchMangas a = new UserSearchMangas(manga_list.SelectedRows[0].Cells[0].Value.ToString());

            this.Hide();
            a.ShowDialog();
            this.Show();
            DbConnection db  = new DbConnection();
            DataTable    ans = db.Select("select manga_id, (select [Name] from Mangas where Manga_ID = wa.Manga_ID) as [Name]," +
                                         "wa.Status, wa.Rating, wa.Favourite from Read_Mangas as wa where wa.User_Name = '" + User.userName + "' order by [name]");

            manga_list.DataSource         = ans;
            manga_list.Columns[0].Visible = false;
            manga_list.ReadOnly           = true;
        }