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: SwissDecTXAssembly: SwissDecTX.Transmitter5 (in SwissDecTX.Transmitter5.dll) Version: 5.0.0.0 (5.0.0.0)
Syntaxpublic void DeclareSalaryLocal(
XmlDocument xmlDoc,
out XmlDocument result,
out XmlDocument messageCreatedAndCrypted,
out XmlDocument messageCreated,
out DateTime creationDateUtc
)
Public Sub DeclareSalaryLocal (
xmlDoc As XmlDocument,
<OutAttribute> ByRef result As XmlDocument,
<OutAttribute> ByRef messageCreatedAndCrypted As XmlDocument,
<OutAttribute> ByRef messageCreated As XmlDocument,
<OutAttribute> ByRef creationDateUtc As DateTime
)
public:
virtual void DeclareSalaryLocal(
XmlDocument^ xmlDoc,
[OutAttribute] XmlDocument^% result,
[OutAttribute] XmlDocument^% messageCreatedAndCrypted,
[OutAttribute] XmlDocument^% messageCreated,
[OutAttribute] DateTime% creationDateUtc
) sealed
function DeclareSalaryLocal(xmlDoc, result, messageCreatedAndCrypted, messageCreated, 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.
RemarksThe 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.
ExampleCalling 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);
} catch (Exception ex) {
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
See Also