private void grvDecleration_CellMouseDoubleClick_1(object sender, DataGridViewCellMouseEventArgs e) { try { if (e.RowIndex >= 0 && grvDecleration.SelectedRows.Count == 1) // Only select one row { var frmExport = new FrmDecleExportOption(_mainForm, _userInfo, Convert.ToInt64(grvDecleration.SelectedRows[0].Cells["DeclarationID"].Value), _declerationOptionType); frmExport.Show(this); } } catch (Exception ex) { logger.Error(ex.ToString()); if (GlobalInfo.IsDebug) MessageBox.Show(ex.ToString()); } }
private void btnUpdate_Click(object sender, EventArgs e) { try { if (grvDecleration.SelectedRows.Count != 0) { var frmDecleExportOption = new FrmDecleExportOption(_mainForm, _userInfo, Convert.ToInt64(grvDecleration.SelectedRows[0].Cells["DeclarationID"].Value), _declerationOptionType); frmDecleExportOption.Show(this); } else { MessageBox.Show("Bạn cần chọn 1 tờ khai cần cập nhật."); } } catch (Exception ex) { logger.Error(ex.ToString()); if (GlobalInfo.IsDebug) MessageBox.Show(ex.ToString()); } }