Example #1
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         EventDAO edao          = new EventDAO();
         var      bindinglist10 = edao.FindByName(txtTickEve.Text);
         var      source10      = new BindingSource(bindinglist10, null);
         dgvEvents.DataSource = source10;
         dgvEvents.Columns.Remove("Artist");
         dgvEvents.Columns.Remove("Menu");
         dgvEvents.Columns.Remove("Tickets");
         dgvEvents.Columns[0].HeaderText = "Event ID";
         dgvEvents.Columns[1].HeaderText = "Name";
         dgvEvents.Columns[2].HeaderText = "Description";
         dgvEvents.Columns[3].HeaderText = "Begin";
         dgvEvents.Columns[4].HeaderText = "End";
         dgvEvents.Columns[5].HeaderText = "Artist ID";
         dgvEvents.Columns[6].HeaderText = "Menu ID";
     }
     catch (NullReferenceException) { }
     catch (ArgumentException) { }
 }
Example #2
0
        private void btnClearTick_Click(object sender, EventArgs e)
        {
            txtTickName.Text   = "";
            lblTickEvent2.Text = "";
            txtTickEve.Text    = "";
            txtTickEve.Text    = "";
            txtTickName.Focus();
            EventDAO edao          = new EventDAO();
            var      bindinglist11 = edao.FindByName(txtTickEve.Text);
            var      source11      = new BindingSource(bindinglist11, null);

            dgvEvents.DataSource = source11;
            dgvEvents.Columns.Remove("Artist");
            dgvEvents.Columns.Remove("Menu");
            dgvEvents.Columns.Remove("Tickets");
            dgvEvents.Columns[0].HeaderText = "Event ID";
            dgvEvents.Columns[1].HeaderText = "Name";
            dgvEvents.Columns[2].HeaderText = "Description";
            dgvEvents.Columns[3].HeaderText = "Begin";
            dgvEvents.Columns[4].HeaderText = "End";
            dgvEvents.Columns[5].HeaderText = "Artist ID";
            dgvEvents.Columns[6].HeaderText = "Menu ID";
        }