Create C# script to export documents and XML file to folder (

We have a site built in C# which manages documents and forms. We need to add a feature that will export the documents and a linked XML file to a directory on the site. Project requirements are below:

1. For each document with a status of 'Approved' add an option under the 'Action' column called 'Export to ECM.' This will trigger the export for that document. (screen shot attached)

2. Create a directory for the exports called 'ecm' in the root directory. In the code this location will be referenced through a variable in appSettings. Add a new value in [login to view URL] under <appSettings> as

<add key="ECMDirectory" value="~/ecm" so that we can easily change the directory in the future. Reference this key when writing your code instead of a direct path to the directory.

4. Database Changes

- Create new column in database to store ECM_id: documents>doc_ecm_id (varchar(255), allow NULL). This id will link to a related table that stores export history. When a document is exported if ECM_id doesn't exist the script will create a new unique value for this, if it already exists script will use the current value.

- Create new table to store export history: table name = ECMExportHistory


id: int, primary key, unique id, No NULLs

ECM_id: int, No NULLs, key which links to documents table

FileName: varchar(255), No NULLs, name of the XML file exported

CreatedDate: datetime, No NULLs, date of the export

4. Create the script to export the document:

- Place script in /App_Code/[login to view URL] file

- This script will be accessed through different methods later so should be flexible.

- Input parameters = (string doc_id) the id of the document from the database: documents > id

- Output = return false on error or 'ECM_id' if successful. ECM_id is a unique id to identify that this document has been exported. Will be stored in the database column create above: documents > doc_ecm_id

<< Script >>

5. Script will create a unique name for the exported files so they don't overwrite any other export. This name will be used for both the exported file and the XML file placed in the export folder.

- Name should be: {document id} + {loan id} + {date} + {incremental number if file already exists in folder}

- Example: 45862-55285-09062017-8

- Example of exported files with this name:

[login to view URL]

[login to view URL]

6. Export/copy the document

- could be pdf, Excel, zip or Word doc

- The below items determine where the file is located:

if (doc_status == "Submitted" OR doc_status == "Saved" OR doc_revert_status == "Saved" OR doc_revert_status == "Saved")

- get document from /generated/ + {doc_pdf_submission_link}

if (doc_status == "Uploaded" OR doc_revert_status == "Uploaded")

- get document from /upload/ + {doc_pdf_submission_link}

if (doc_pdf_submission_link == "multi")

- Need to compress multiple files into a zip file. Check [login to view URL] line 672 for an example of this

- Once you have the correct file create a copy in the /ecm/ directory and rename it to {file name (step 5)} + extension

7. Create the XML file.

The export will contain a matching XML file with additional data about the document. The XML file will be named the same as the file but with a .xml extension. The XML file should contain the following info in XML format:

- ECM_id

- ECMName: the generated file name created in step 5 with no extension

- FileName: the document from step 6. ie. [login to view URL]

- All fields from the attached SQL statement (modify WHERE to use the correct document>id)

8. Update the Database

Once the export is completed and both files have been moved to the /ecm/ directory update the datebase:

- Update documents>doc_ecm_id with the ECM_id if this is a new export. If the document has previously been exported don't change the value.

- Insert entry into: ECMExportHistory. Always add a new entry, the field ECM_id is the key that will tie all entries to the original document

Let me know if there are any questions.

Taidot: .NET, ASP.NET, C# -ohjelmointi, XML

Näytä lisää: script add user xml file, export tables xml file access, export map xml file access 2007, php script post data xml file wordpress post, zencart export order xml file, php script extract data xml file, export data xml file net, script replace text xml file, xml file maintenance asp net, write xml file flash asp net, perl script add comments xml file run time, perl script add comments xml file, parse xml file xpath asp net, export download xml file sap, code projects xml file parsing asp net, visual basic script read write xml file, xml file folder vbscript, php script can accept xml file via post, validate xml file schema asp net, parse xml file visual basic net

Tietoa työnantajasta:
( 398 arvostelua ) Columbus, United States

Projektin tunnus: #15111866

Myönnetty käyttäjälle:


I will create Export documents to ECM and make required database changes on your website. I will complete this work in 5 days. Relevant Skills and Experience ASP.NET, C# Programming, HTML, SQL Server Proposed Lisää

$158 USD 5 päivässä
(123 Arvostelua)

25 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön


I did not saw the action column in screenshot. can we discuss more in details? Relevant Skills and Experience I did not saw the action column in screenshot. can we discuss more in details? Proposed Milestones $250 US Lisää

$250 USD 3 päivässä
(107 arvostelua)

Hi, I have read and understood the requirement, it's quite detailed and more of a pseudo code. I am a c# developer and I will be readily available to work with you on this project. Relevant Skills and Experience C#, Lisää

$150 USD 4 päivässä
(33 arvostelua)
$211 USD 3 päivässä
(41 arvostelua)

IT Path Solutions has Expert Team in Web,Windows and Mobile App Development: - Asp.Net, - PHP / WordPress etc. - iPhone/iOS - Android Relevant Skills and Experience From here you can check my highest Microsoft Ce Lisää

$526 USD 3 päivässä
(26 arvostelua)

I'd like to work with you on the project,Having 9+ Years of Experience as a Software Developer, successfully completed many projects (please see my reviews). Relevant Skills and Experience Experienced in ASP.Net, C#, Lisää

$150 USD 3 päivässä
(40 arvostelua)

Hello, I'm interested to work on this. Please message me. We will discuss in detail. Thanks, Sheik

$198 USD 5 päivässä
(58 arvostelua)

Feel fee to contact me [login to view URL] me message to discuss further more details .We provide the comments,images,videos,demos and live sessions in order to help the [login to view URL] payment only after the work [login to view URL] yo Lisää

$150 USD 3 päivässä
(18 arvostelua)

Thanks for the detailed spec. I assume I can get a copy of the DB structure for testing? Relevant Skills and Experience Previous C# experience Proposed Milestones $25 USD - Add drop down options $25 USD - DB updates Lisää

$250 USD 6 päivässä
(19 arvostelua)

Hi Im an expert in .net I have been working in software development for the last 20 years Regards Carlos

$155 USD 10 päivässä
(21 arvostelua)
$250 USD 7 päivässä
(54 arvostelua)

I am having more than 13 years experience of working as a web developer and having a great exposure of website Development Relevant Skills and Experience ASP.Net, MVC,C#,XML,MSSQL Proposed Milestones $75 USD - Start Lisää

$250 USD 5 päivässä
(18 arvostelua)

Greetings! I understand that you need an C# script to export documents and XML file to folder. We have done similar project before and can do this for you. Please message for further discussion. Relevant Skills and E Lisää

$155 USD 3 päivässä
(7 arvostelua)

I can complete this project in no more than 1 week. Let me know if you are interested so that we can discuss understanding and questions? Relevant Skills and Experience, C# Programming, Microsoft SQL Serve Lisää

$130 USD 5 päivässä
(13 arvostelua)

A great team is here for your service!! I read the project description properly, and I agreed to fulfill 100% of all your requirements. I can start your important project right away. Stay tuned, I'm still working on Lisää

$222 USD 3 päivässä
(4 arvostelua)
$155 USD 3 päivässä
(7 arvostelua)

I have got over 8 Years of experience working as full stack .Net developer. Since I am new to freelancer I am quoting less price to gain some reputation. I can even do this project for free. Relevant Skills and Experi Lisää

$35 USD 3 päivässä
(4 arvostelua)

A proposal has not yet been provided

$55 USD 5 päivässä
(2 arvostelua)
$155 USD 3 päivässä
(0 arvostelua)
$133 USD 3 päivässä
(0 arvostelua)

Hello , i worked a lot of features like this in MVC throw my work , so lets do it bro. Stay tuned, I'm still working on this proposal.

$166 USD 5 päivässä
(0 arvostelua)