Example #1
0
 private void Theater_info_normal_Click(object sender, EventArgs e)
 {
     this.Hide();
     Manage_theater theat = new Manage_theater();
     theat.ShowDialog();
 }
Example #2
0
File: Main.cs Project: Aneetha/Test
        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);
            }
        }
Example #3
0
 private void pictureBox11_Click(object sender, EventArgs e)
 {
     this.Close();
     Manage_theater theat = new Manage_theater();
     theat.Close();
 }
Example #4
0
File: Main.cs Project: Aneetha/Test
 private void theater_add_Click(object sender, EventArgs e)
 {
     common.edit_flag = false;
     Manage_theater add = new Manage_theater();
     add.ShowDialog();
 }