コード例 #1
0
 public PictureEvents(ExistingEvent existingEvent)
 {
     InitializeComponent();
     this.existingEvent = existingEvent;
     this.username      = existingEvent.username;
     this.eventName     = existingEvent.existingEventComboBox.Text;
 }
コード例 #2
0
        private void backExixtingEventButton_Click(object sender, EventArgs e)
        {
            ExistingEvent existingEvent = new ExistingEvent(this);

            this.Hide();
            existingEvent.Show();
        }
コード例 #3
0
        private void existingEventToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ExistingEvent existingEvent = new ExistingEvent(this);

            this.Hide();
            existingEvent.Show();
        }
コード例 #4
0
        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);
            }
        }