modales inicio
This commit is contained in:
@@ -27,39 +27,49 @@ public partial class Ventas_RepCancelacionesPorAtender : ClsPaginas
|
||||
}
|
||||
private void CargarPendientes()
|
||||
{
|
||||
Cancelacion.CancelacionSoapClient objServicio = new Cancelacion.CancelacionSoapClient();
|
||||
Cancelacion.StructCancel resp = objServicio.ObtienePendientes(UsuarioActual.Empresa.RFC, "UserTest", "1234567890");
|
||||
if (resp.Estado == 0)
|
||||
|
||||
//Cancelacion.CancelacionSoapClient objServicio = new Cancelacion.CancelacionSoapClient();
|
||||
//Cancelacion.StructCancel resp = objServicio.ObtienePendientes(UsuarioActual.Empresa.RFC, "UserTest", "1234567890");
|
||||
//if (resp.Estado == 0)
|
||||
//{
|
||||
// string XmlPendientes = DecodeBase64(resp.Xml);
|
||||
// StringReader theReader = new StringReader(XmlPendientes);
|
||||
// DataSet theDataSet = new DataSet();
|
||||
// theDataSet.ReadXml(theReader);
|
||||
// if (theDataSet.Tables[0].Rows[0]["Uuid"].ToString() != "null")
|
||||
// {
|
||||
// var sb = new StringBuilder();
|
||||
// foreach (DataRow item in theDataSet.Tables[0].Rows)
|
||||
// {
|
||||
// sb.AppendFormat("{0};", item["Uuid"].ToString());
|
||||
// }
|
||||
// var ObjVentas = new ClsVentas();
|
||||
// if (ObjVentas.GetFacturasCanceladasPendientes(sb.ToString(), UsuarioActual.CveEmpresa))
|
||||
// {
|
||||
// GvDatos.DataSource = ObjVentas.DtResultados;
|
||||
// }
|
||||
// ObjVentas.Dispose();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// GvDatos.DataSource = null;
|
||||
// Alert("No se encontraron cancelaciones pendientes");
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// GvDatos.DataSource = null;
|
||||
// Alert("Error al obtener cancelaciones pendientes: " + resp.Descripcion, ModExtensiones.TipoMensaje.MsgError);
|
||||
//}
|
||||
using (ClsVentas ObjVentas = new ClsVentas())
|
||||
{
|
||||
string XmlPendientes = DecodeBase64(resp.Xml);
|
||||
StringReader theReader = new StringReader(XmlPendientes);
|
||||
DataSet theDataSet = new DataSet();
|
||||
theDataSet.ReadXml(theReader);
|
||||
if (theDataSet.Tables[0].Rows[0]["Uuid"].ToString() != "null")
|
||||
if (ObjVentas.GetFacturasCanceladasPendientesWS(UsuarioActual.Empresa.RFC, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
foreach (DataRow item in theDataSet.Tables[0].Rows)
|
||||
{
|
||||
sb.AppendFormat("{0};", item["Uuid"].ToString());
|
||||
}
|
||||
var ObjVentas = new ClsVentas();
|
||||
if (ObjVentas.GetFacturasCanceladasPendientes(sb.ToString(), UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvDatos.DataSource = ObjVentas.DtResultados;
|
||||
}
|
||||
ObjVentas.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
GvDatos.DataSource = null;
|
||||
Alert("No se encontraron cancelaciones pendientes");
|
||||
GvDatos.DataSource = ObjVentas.DtResultados;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GvDatos.DataSource = null;
|
||||
Alert("Error al obtener cancelaciones pendientes: " + resp.Descripcion, ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
|
||||
|
||||
GvDatos.DataBind();
|
||||
UPDatos.Update();
|
||||
}
|
||||
@@ -153,9 +163,8 @@ public partial class Ventas_RepCancelacionesPorAtender : ClsPaginas
|
||||
private string DecodeBase64(string strXMLCodificado)
|
||||
{
|
||||
try
|
||||
{
|
||||
byte[] decbuff = Convert.FromBase64String(strXMLCodificado);
|
||||
return System.Text.Encoding.UTF8.GetString(decbuff);
|
||||
{
|
||||
return System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(strXMLCodificado));
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user