private void theater_search_CellClick(object sender, DataGridViewCellEventArgs e) { try { common.edit_flag = false; common.m_edit_flag = false; theater_search.SelectionMode = DataGridViewSelectionMode.CellSelect; if (e.ColumnIndex == 5) { try { theater_search.CurrentRow.ReadOnly = false; if (m_flag == true) { common.m_edit_flag = true; //common.movie_name = theater_search.CurrentRow.Cells[0].Value.ToString(); //common.movie_name = theater_search.CurrentRow.Cells[1].Value.ToString(); Manage_moive add = new Manage_moive(); add.ShowDialog(); } else { common.edit_flag = true; common.theter_name = theater_search.CurrentRow.Cells[0].Value.ToString(); common.screen_name = theater_search.CurrentRow.Cells[1].Value.ToString(); Manage_theater add = new Manage_theater(); add.ShowDialog(); common.show_table.Clear(); db_query.theater_show_all(); theater_normal_Click(this.theater_normal, null); } } catch (Exception ex) { MessageBox.Show(ex.Message); } } if (e.ColumnIndex == 6) { try { bool Continue = false; if (DialogResult.Yes == MessageBox.Show("Are you sure you want to delete?\n\n", "Information", MessageBoxButtons.YesNo, MessageBoxIcon.Information)) Continue = true; else Continue = false; if (Continue) { if (m_flag == true) { //common.movie_name = Convert.ToString(theater_search.CurrentRow.Cells[0].Value); //common.movie_date = Convert.ToString(theater_search.CurrentRow.Cells[1].Value); //common.movie_director = Convert.ToString(theater_search.CurrentRow.Cells[2].Value); //common.movie_genre = Convert.ToString(theater_search.CurrentRow.Cells[3].Value); //common.movie_language = Convert.ToString(theater_search.CurrentRow.Cells[4].Value); //db_query.m_delete(); //movie_normal_Click(this.movie_normal, null); } else { try{ common.theter_name = Convert.ToString(theater_search.CurrentRow.Cells[0].Value); common.screen_name = Convert.ToString(theater_search.CurrentRow.Cells[1].Value); common.location = Convert.ToString(theater_search.CurrentRow.Cells[2].Value); common.city = Convert.ToString(theater_search.CurrentRow.Cells[3].Value); common.status = Convert.ToString(theater_search.CurrentRow.Cells[4].Value); db_query.theater_delete(); theater_normal_Click(this.theater_normal, null); } catch(Exception ex) { MessageBox.Show(ex.Message); } } } } catch (Exception ex) { MessageBox.Show(ex.Message); } } } catch(Exception ex) { MessageBox.Show(ex.Message); } }
private void theater_search_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == theater_search.Columns.Count - 2 && movie_panel.Visible==true) { string query = "select movie_name, release_date, director,genre,written,language,run_time,image,video,featured,status,descrip from table_movie_details where movie_name = '"+theater_search.CurrentRow.Cells[0].Value.ToString().Trim()+"' and language ='"+theater_search.CurrentRow.Cells[6].Value.ToString().Trim()+"'"; db_query.moive_edit(query); common.moive_edit = true; Manage_moive movie = new Manage_moive(); movie.ShowDialog(); } }
private void moive_add_Click(object sender, EventArgs e) { Manage_moive add = new Manage_moive(); add.ShowDialog(); }