//********************************************************************** /// <summary> /// コード取得 /// </summary> /// <returns>コード</returns> //********************************************************************** public string getCode() { try { return(getCode(this.SelectedIndex)); } catch (Exception ex) { b2Com.ShowErrMsg(ex); return(""); } }
/// <summary> /// 選択決定ボタン選択時処理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <remarks>選択したコースのコードを取得し画面を終了します</remarks> private void btnOk_Click(object sender, EventArgs e) { try { int lintI = 0; //------------------------------------------------------------------------------ // ■ 選択行確認 //------------------------------------------------------------------------------ if (spdList_Sheet1.RowCount <= 0) { return; } if (spdList_Sheet1.Rows[spdList_Sheet1.ActiveRowIndex].Visible == false) { return; } //------------------------------------------------------------------------------ // ■ 選択行データ取得 //------------------------------------------------------------------------------ gstrRes = new string[spdList_Sheet1.ColumnCount]; for (lintI = 0; lintI < spdList_Sheet1.ColumnCount; lintI++) { gstrRes[lintI] = spdList_Sheet1.Cells[spdList_Sheet1.ActiveRowIndex, lintI].Value.ToString(); } //------------------------------------------------------------------------------ // ■ 画面終了 //------------------------------------------------------------------------------ this.DialogResult = DialogResult.OK; this.Close(); } catch (Exception ex) { b2Com.ShowErrMsg(ex); } }