private void GridViewAraclar_Click(object sender, EventArgs e) { GridViewAraclar.OptionsSelection.EnableAppearanceFocusedRow = true; if (GridViewAraclar.GetFocusedDataRow() != null && !Focusta) { Focus_Arac(); } _Focusta = false; }
void Focus_Arac() { if (_Yukleme || GridViewAraclar.GetFocusedDataRow() == null) { return; } ucAracDetay1.Yukle_Arac(Convert.ToInt32(GridViewAraclar.GetFocusedRowCellValue("AracID"))); }
void Sec() { if (GridViewAraclar.RowCount == 0 || GridViewAraclar.GetFocusedDataRow() == null) { _AracID = 0; _RuhsatSahibi = null; _SaseNo = null; _Marka = null; _Model = null; _Plaka = null; this.DialogResult = DialogResult.Abort; } else { _AracID = Convert.ToInt32(GridViewAraclar.GetFocusedDataRow()["AracID"]); _Plaka = GridViewAraclar.GetFocusedDataRow()["Plaka"].ToString(); _RuhsatSahibi = GridViewAraclar.GetFocusedDataRow()["RuhsatSahibi"].ToString(); _SaseNo = GridViewAraclar.GetFocusedDataRow()["SaseNo"].ToString(); _Marka = GridViewAraclar.GetFocusedDataRow()["MarkaAdi"].ToString(); _Model = GridViewAraclar.GetFocusedDataRow()["ModelAdi"].ToString(); this.DialogResult = DialogResult.OK; } }