Click or drag to resize

Transmitter5DeclareSalaryLocal Method

Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter5 (in SwissDecTX.Transmitter5.dll) Version: 5.0.0.0 (5.0.0.0)
Syntax
public void DeclareSalaryLocal(
	XmlDocument xmlDoc,
	out XmlDocument result,
	out XmlDocument messageCreatedAndCrypted,
	out XmlDocument messageCreated,
	out DateTime creationDateUtc
)

Parameters

xmlDoc  XmlDocument
The salary declaration to process, either annual declaration, monthly, or monthly totals.
result  XmlDocument
Any error that might be reported during the processing and validation of the declaration.
messageCreatedAndCrypted  XmlDocument
The signed and crypted EIV message containing the declaration, created by this function. Can be transmitted manually to the SwissDec web-based receiver.
messageCreated  XmlDocument
The signed (but not encrypted) message containing the declaration, created by this function. This message can be used for logging purposes.
creationDateUtc  DateTime
The actual UTC date/time at which the operation occurred.
Remarks
The UC005 (Replacement) and UC006 (Test) cases have to be handled at the application level, i.e. you simply insert the appropriate tag(s) in the XML declaration as described in the specification. There is absolutely no difference at the transmission level and the server will interpret your submission according to those options, if present. If the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId", this method will generate a unique identifier for you automatically (you need to parse the messageCreated text to figure out the request ID that was created, or the server response). A valid SwissDecTX license is required to execute this method call.
Example
Calling Transmitter.DeclareSalaryLocal()
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter5();

           DateTime creationDateUtc;
           XmlDocument result, messageCreatedAndCrypted, messageCreated;

           tx.DeclareSalaryLocal(xmlDoc, out result, out messageCreatedAndCrypted, out messageCreated, out creationDateUtc); // xmlDoc declared elsewhere

           // TODO: use messageCreated, else check result

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also