private void btnDownload_Click(object sender, EventArgs e) { try { exportExcelAlgorithms = new ExportExcelAlgorithms(); exportExcelAlgorithms.ExportFileFromDataGridViewEmployee(dgv, "EmployeeList"); } catch (Exception) { string code = System.Runtime.InteropServices.Marshal.GetExceptionCode().ToString(); if (code == "-532462766") { CustomMessageBox.MessageBox.ShowCustomMessageBox(Common.clsLanguages.GetResource("CRM292"), Common.clsLanguages.GetResource("CRM11"), Common.Config.CUSTOM_MESSAGEBOX_ICON.Information, Common.Config.CUSTOM_MESSAGEBOX_BUTTON.OK); } return; } }