Publish() public method

public Publish ( lr_Envelope docs ) : PublishResponse
docs lr_Envelope
return PublishResponse
Ejemplo n.º 1
0
    protected void PublishDocuments(object sender, EventArgs e)
    {
        bool validated = ValidateRequiredFields();
        if(validated)
        {
            lr_Envelope envelope = buildEnvelopeFromMapping();

            LRClient client = new LRClient(this.ServerInfoWidget.NodeUrl);
            if (!String.IsNullOrEmpty(this.ServerInfoWidget.HttpUsername))
            {
                client.Username = ServerInfoWidget.HttpUsername;
                client.Password = ServerInfoWidget.HttpPassword;
            }
            PublishResponse res = client.Publish(envelope);
            buildAndShowNotification(res);
        }
        else
            ShowMissingFields();
    }