1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
private void button2_Click(object sender, System.EventArgs e)
{
#region
// lblMessage.Visible = true;
// lblMessage.Text = "";
// Export all the details
try
{
// Get the datatable to export
DataTable dt = dsSelectionListeDiffere.Tables[0].Copy();
dsSelectionListeDiffere = FrmFonctionPrincipale.getListeDifferesParClient(1);
// Export all the details to Excel
RKLib.ExportData.Export objExport = new RKLib.ExportData.Export("Win");
objExport.ExportDetails(dt, Export.ExportFormat.Excel, "C:\\EmployeesInfo.xls");
MessageBox.Show("Exporté Avec Succès dans C:\\EmployeesInfo.xls");
}
catch(Exception Ex)
{
MessageBox.Show(Ex.Message);
// lblMessage.Text = Ex.Message;
}
#endregion
} |