private void bAdd_Click(object sender, EventArgs e) { var form = new EventForm(null, this); form.Show(); this.Hide(); }
private void bEdit_Click(object sender, EventArgs e) { var eventModel = (EventModel)dgEvents.Rows[dgEvents.CurrentCell.RowIndex].DataBoundItem; var form = new EventForm(eventModel, this); form.Show(); this.Hide(); }