private void buttonCreateSchedule_Click(object sender, EventArgs e) { foreach (var form in Application.OpenForms.OfType <CreateScheduleForm>()) { var fr = form as Form; fr.Activate(); return; } var f = new CreateScheduleForm(_patient); f.ShowDialog(); }
private void buttonCreate_Click(object sender, EventArgs e) { foreach (var form in Application.OpenForms.OfType <CreateScheduleForm>()) { var fr = form as Form; fr.Activate(); return; } var f = new CreateScheduleForm(); f.ShowDialog(); gridControl1.DataSource = schedulueBusiness.GetAll(); }