private void dataGridView2_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 5) { Film film = new Film(); for (int i = 0; i < AllF.Count; i++) { int ind = e.RowIndex; if (AllF[i].FName == dataGridView2.Rows[ind].Cells[0].Value.ToString()) { film = AllF[i]; break; } } OneFilm F = new OneFilm(film, this); F.Show(); this.Hide(); } }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { Film film = new Film(); for (int i = 0; i < AllF.Count; i++) { int ind = e.RowIndex; int indC = e.ColumnIndex; if (AllF[i].FName == dataGridView1.Columns[indC].HeaderText) { film = AllF[i]; break; } } OneFilm F = new OneFilm(film, this); F.Show(); this.Hide(); }
private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 1) { Film film = new Film(); for (int i = 0; i < Main.AllF.Count; i++) { int ind = e.RowIndex; if (Main.AllF[i].FName == dataGridView2.Rows[ind].Cells[0].Value.ToString()) { film = Main.AllF[i]; break; } } f = true; OneFilm O = new OneFilm(film, MM); O.Show(); this.Close(); } }
private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 4) { Film film = new Film(); for (int i = 0; i < OneFilm.Buy.Count; i++) { int ind = e.RowIndex; if (OneFilm.Buy[i].FName == dataGridView2.Rows[ind].Cells[0].Value.ToString()) { film = OneFilm.Buy[i]; OneFilm.Buy.Remove(film); dataGridView2.Rows.RemoveAt(e.RowIndex); dataGridView2.Refresh(); Inf(); break; } } } if (e.ColumnIndex == 3) { Film film = new Film(); for (int i = 0; i < OneFilm.Buy.Count; i++) { int ind = e.RowIndex; if (OneFilm.Buy[i].FName == dataGridView2.Rows[ind].Cells[0].Value.ToString()) { film = OneFilm.Buy[i]; flag = true; break; } } OneFilm o = new OneFilm(film, OO); o.Show(); this.Close(); } }
private void Movie_FormClosed(object sender, FormClosedEventArgs e) { f = true; One.Show(); }