private void Add_timing_Click(object sender, EventArgs e) { if (panel1.Controls.Count <= 1) { MessageBox.Show("Sorry.You can't delete show timing.", "Movie Shop", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { add_timing add_time = new add_timing(); panel1.Controls.Add(add_time); add_time.Dock = DockStyle.Top; } }
private void Manage_theater_Load(object sender, EventArgs e) { this.CenterToParent(); if(panel1.Controls.Count<=0) { for (int ind = 0; ind < 4;ind++ ) { add_timing add = new add_timing(); panel1.Controls.Add(add); add.Dock = DockStyle.Top; } } if(panel2.Controls.Count<=0) { for (int ind = 0; ind < 4;ind++ ) { add_category add = new add_category(); panel2.Controls.Add(add); add.Dock = DockStyle.Top; } } if (common.edit_flag == true) { db_query.edit_text_pass(); theater_dropdown.Enabled = false; theater_text.Text = common.t_old_name; theater_Screen_name_txt.Text = common.screen_name; theater_location_txt.Text = common.location; theater_city_txt.Text = common.city; sate_txt.Text = common.state; theater_latitude.Text = common.latitude; theater_longitude.Text = common.longitude; //rows_text.Text = common.rows.ToString(); //cols_txt.Text = common.rows.ToString(); if (common.status.ToLower() == "active") { theater_active.Checked = true; } else { theater_inactive.Checked = true; } } }