Before working on C# code you first need to make sure that you have Integration Services and Business Intelligence from Sql Server 20005/2008 installed,then you can Create SSIS Package on your local machine.
The code for C# is given below but first you need to add refernce for Microsoft.SqlServer.ManagedDTS and includeMicrosoft.SqlServer.Dts.Runtime
You can check if the packet was executed sucessfully or not by checking the result object value.
void button1_Click(object sender, EventArgs e)DTSExecResult result = new DTSExecResult() ;//Declare and instantiate a new DTS application Microsoft.SqlServer.Dts.Runtime.
Application application = new Microsoft.SqlServer.Dts.Runtime.Application();
//Declare a DTS package and import a saved package file (either by creating from SQL Management Studio on
//export function, or from Bussines Development (new Integration Services project)
export.ProtectionLevel = Package export = application.LoadPackage("E:\\Package.dtsx", null,false); DTSProtectionLevel.DontSaveSensitive; //it's always best to handle possible errors!
//Declare a DTS result, and execute it
result = export.Execute();
//MessageBox.Show("While exporting the file, the following error ocurred: " + result.ToString());
catch (DtsException ex)