예제 #1
0
 //btn New
 private void btnNew_Click(object sender, EventArgs e)
 {
     using (frmNewEdit frm = new frmNewEdit(null))
     {
         if (frm.ShowDialog() == DialogResult.OK)
         {
             eventsTableBindingSource.DataSource = db.EventsTable.ToList();
         }
         RefreshEvents();
     }
 }
예제 #2
0
 //btn Edit
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (eventsTableBindingSource.Current == null)
     {
         return;
     }
     using (frmNewEdit frm = new frmNewEdit(eventsTableBindingSource.Current as EventsTable))
     {
         if (frm.ShowDialog() == DialogResult.OK)
         {
             eventsTableBindingSource.DataSource = db.EventsTable.ToList();
         }
         RefreshEvents();
     }
 }