private void btnDuzenle_Click(object sender, EventArgs e) { var rowId = (long)grdVOlaylar.GetRowCellValue(grdVOlaylar.FocusedRowHandle, "Id"); var olayListesi = new YeniOlay(new KayitDuzenleDTO { Duzenleme = true, EvrakId = rowId, EvrakTip = EvrakTip.Olay }); olayListesi.ShowDialog(); RefreshGridDataSource(); }
/// <summary> /// Yeni Olay /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnYeniTutanak_ItemClick(object sender, ItemClickEventArgs e) { var isOpen = false; foreach (var f in from Form f in Application.OpenForms where f.Text == "Yeni Olay" select f) { isOpen = true; f.Focus(); break; } if (isOpen) { return; } var child = new YeniOlay(new KayitDuzenleDTO { Duzenleme = false, }) { MdiParent = this }; child.Show(); }