/// <summary> /// ダブルクリック /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgvIchiran_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1) { return; } String mentorId = (String)dgvIchiran[(int)column.MENTOR_ID, e.RowIndex].Value; String mentorNm = (String)dgvIchiran[(int)column.MENTOR_NAME, e.RowIndex].Value; String menteeId = (String)dgvIchiran[(int)column.MENTEE_ID, e.RowIndex].Value; String menteeNm = (String)dgvIchiran[(int)column.MENTEE_NAME, e.RowIndex].Value; string startDate = ((DateTime)dgvIchiran[(int)column.TEKIYO_START_DATE, e.RowIndex].Value).ToString("yyyy/MM/dd"); string EndDate = ""; if (!string.IsNullOrEmpty(dgvIchiran[(int)column.TEKIYO_END_DATE, e.RowIndex].Value.ToString())) { EndDate = ((DateTime)dgvIchiran[(int)column.TEKIYO_END_DATE, e.RowIndex].Value).ToString("yyyy/MM/dd"); } MS0020 ms0020 = new MS0020(user, mentorId, mentorNm, menteeId, menteeNm, startDate, EndDate); ms0020.ShowDialog(); if (ms0020.torokuFlg) { Result(); } }
/// <summary> /// 新規登録ボタン /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnInsert_Click(object sender, EventArgs e) { MS0020 ms0020 = new MS0020(user); ms0020.ShowDialog(); if (ms0020.torokuFlg) { Result(); } }