public PictureEvents(ExistingEvent existingEvent) { InitializeComponent(); this.existingEvent = existingEvent; this.username = existingEvent.username; this.eventName = existingEvent.existingEventComboBox.Text; }
private void backExixtingEventButton_Click(object sender, EventArgs e) { ExistingEvent existingEvent = new ExistingEvent(this); this.Hide(); existingEvent.Show(); }
private void existingEventToolStripMenuItem_Click(object sender, EventArgs e) { ExistingEvent existingEvent = new ExistingEvent(this); this.Hide(); existingEvent.Show(); }
private void removeButton_Click(object sender, EventArgs e) { try { SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString); string sql = "DELETE FROM Pictures WHERE PictureID='" + pictureId.ToString() + "'"; SqlCommand command = new SqlCommand(sql, connection); connection.Open(); SqlDataReader reader = command.ExecuteReader(); MessageBox.Show("Picture Deleted"); //PictureEvents pictureEvents = new PictureEvents(this); connection.Close(); ExistingEvent existingEvent = new ExistingEvent(this); this.Hide(); existingEvent.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }