//Cancelamento
private void btnExecCanc_Click(object sender, EventArgs e)
{
try
{
Cursor = Cursors.WaitCursor;
btnExecCanc.Enabled = false;
asscshcte.asscshcte cte = new asscshcte.asscshcte();
MessageBox.Show(cte.CTeCancelamento(txtCanChCte.Text, txtCanNProt.Text, txtCanxJust.Text)
, "Cancelamento CT-e", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
finally
{
Cursor = Cursors.Default;
btnExecCanc.Enabled = true;
}
}