Ejemplo n.º 1
0
 protected void btnCargaLote_Click(object sender, EventArgs e)
 {
     PFACW0001.wsFacturaElectronica wsface = new PFACW0001.wsFacturaElectronica();
     PFACW0001.RespuestaGeneral respuesta = new PFACW0001.RespuestaGeneral();
     wsface.Timeout = 42300000;
     respuesta = wsface.RegistraLoteDocumentos(ddlTipoDocumento.SelectedValue,ddlCompania.SelectedValue,"",txtFechaInicio.Text.Replace("/",""),txtFechaFin.Text.Replace("/",""),Session["User"].ToString());
     if (respuesta.Resultado)
     {
         lblErrors.Text = respuesta.Mensaje;
         string script = "$(function() { openDialog('respuestaWS'); });";
         Page.ClientScript.RegisterStartupScript(Page.GetType(), "successWS", script, true);
         LimpiarDatos();
     }
     else
     {
         lblErrors.Text = respuesta.Mensaje;
         string script = "$(function() { openDialog('respuestaWS'); });";
         Page.ClientScript.RegisterStartupScript(Page.GetType(), "errorWS", script, true);
     }
 }
Ejemplo n.º 2
0
 protected void btnCargaDocumento_Click(object sender, EventArgs e)
 {
     PFACW0001.wsFacturaElectronica wface = new PFACW0001.wsFacturaElectronica();
     PFACW0001.RespuestaGeneral respuesta = new PFACW0001.RespuestaGeneral();
     string anulado = "";
     if (chkAnulada.Checked)
     {
         anulado = "A";
     }
     respuesta = wface.RegistraDocumento(ddlCompania.SelectedValue, txtDocumento.Text.ToUpper(), anulado, "", ddlTipoDocumento.SelectedValue.ToString(), Session["User"].ToString(),txtFechaDocumento.Text);
     if (respuesta.Resultado)
     {
         lblErrors.Text = respuesta.Mensaje;
         string script = "$(function() { openDialog('respuestaWS'); });";
         Page.ClientScript.RegisterStartupScript(Page.GetType(), "successWS", script, true);
         LimpiarDatos();
     }
     else
     {
         lblErrors.Text = respuesta.Mensaje;
         string script = "$(function() { openDialog('respuestaWS'); });";
         Page.ClientScript.RegisterStartupScript(Page.GetType(), "errorWS", script, true);
     }
 }