Sat Solicitudes Ingreso
This commit is contained in:
@@ -51,7 +51,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
{
|
||||
TxtRpdFechaInicio.Text = string.Format("01/{0:MM/yyyy}", DateTime.Now.AddMonths(-1));
|
||||
TxtRpdFechaFin.Text = string.Format("{0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).LastDayOfMonth());
|
||||
//LnkConsultar_Click(null, null);
|
||||
LnkConsultar_Click(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,13 +63,13 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
nom.SATSolicitudTimbreNominaGral(DdlReporte.SelectedValue.ToString().ToEntero(), UsuarioActual.CveEmpresa, fechaInicio, fechaFin);
|
||||
|
||||
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
|
||||
var libro = wb.AddWorksheet(nom.DtResultados , "Nomina");
|
||||
var libro = wb.AddWorksheet(nom.DtResultados, "Nomina");
|
||||
libro.ColumnsUsed().AdjustToContents();
|
||||
libro.Range(1, 1, 1, nom.DtResultados.Columns.Count).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 153, 153));
|
||||
switch (DdlReporte.SelectedValue.ToString().ToEntero())
|
||||
{
|
||||
case 1:
|
||||
libro.Range(1, 2, 1, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153,0,0));
|
||||
libro.Range(1, 2, 1, 2).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(153, 0, 0));
|
||||
libro.Range(1, 3, 1, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(53, 152, 220));
|
||||
break;
|
||||
case 2:
|
||||
@@ -108,7 +108,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
}
|
||||
libro.Row(1).InsertRowsAbove(4);
|
||||
libro.Range(1, 2, 1, 6).Merge().Value = UsuarioActual.Empresa.Empresa;
|
||||
libro.Range(2, 2, 2, 6).Merge().Value = $"Reporte de {DdlReporte.SelectedItem.Text }";
|
||||
libro.Range(2, 2, 2, 6).Merge().Value = $"Reporte de {DdlReporte.SelectedItem.Text}";
|
||||
libro.Range(3, 2, 3, 6).Merge().Value = $"del {fechaInicio.ToDateTime():dd/MM/yyyy} al {fechaFin.ToDateTime():dd/MM/yyyy}";
|
||||
libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now:dd/MM/yyyy}";
|
||||
libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now:HH:mm}";
|
||||
@@ -135,41 +135,54 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
}
|
||||
protected void LnkConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (ClsNominas nom = new ClsNominas())
|
||||
|
||||
|
||||
GvResumen.DataSource = null;
|
||||
GvDatos.DataSource = null;
|
||||
|
||||
if (DdlReporte.SelectedValue.ToEntero() == 1)
|
||||
{
|
||||
fechaInicio = TxtRpdFechaInicio.Text.ToDateTime().ToString("yyyy/MM/dd");
|
||||
fechaFin = TxtRpdFechaFin.Text.ToDateTime().ToString("yyyy/MM/dd");
|
||||
|
||||
nom.SATSolicitudTimbreNominaGral(0, UsuarioActual.CveEmpresa, fechaInicio, fechaFin);
|
||||
if (nom.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow drow = nom.DtResultados.Rows[0];
|
||||
|
||||
|
||||
//LtlTimbreFiscalTotal.Text = string.Format("{0:N0}", drow["NOXml"]);
|
||||
//LtlTimbreFiscalActivos.Text = string.Format("{0:N0}", drow["NOXmlActivos"]);
|
||||
//LtlTimbreFiscalCancelados.Text = string.Format("{0:N0}", drow["NOXml"].ToString().ToEntero() - drow["NOXmlActivos"].ToString().ToEntero());
|
||||
//LtlSobrerecibosTotal.Text = string.Format("{0:N0}", drow["NOXmlSig"]);
|
||||
//LtlSobrerecibosTimbrados.Text = string.Format("{0:N0}", drow["Timbrados"]);
|
||||
//LtlSobrerecibosSintimbrar.Text = string.Format("{0:N0}", drow["SinTimbrar"]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
nom.SATSolicitudTimbreNominaGral(DdlReporte.SelectedValue.ToString().ToEntero(), UsuarioActual.CveEmpresa, fechaInicio, fechaFin);
|
||||
//GvSolicitudesIngreso.DataSource = nom.DtResultados;
|
||||
//GvSolicitudesIngreso.DataBind();
|
||||
clasegrid = string.Format("reporte{0}", DdlReporte.SelectedValue);
|
||||
GvResumen.Visible = true;
|
||||
GvDatos.Visible = false;
|
||||
}
|
||||
upDatosChec.Update();
|
||||
//SATSolicitudTimbreNominaGral
|
||||
else
|
||||
{
|
||||
GvResumen.Visible = false;
|
||||
GvDatos.Visible = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
using (ClsNominas ObjNom = new ClsNominas())
|
||||
{
|
||||
if (ObjNom.SATSolicitudTimbreIngresosRep(UsuarioActual.CveEmpresa, TxtRpdFechaInicio.Text.ToDate(), TxtRpdFechaFin.Text.ToDate(), DdlReporte.SelectedValue.ToEntero()))
|
||||
{
|
||||
if (DdlReporte.SelectedValue.ToEntero() == 1)
|
||||
{
|
||||
GvResumen.DataSource = ObjNom.DtResultados;
|
||||
}
|
||||
else
|
||||
{
|
||||
GvDatos.DataSource = ObjNom.DtResultados;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GvResumen.DataBind();
|
||||
GvDatos.DataBind();
|
||||
|
||||
UpDatos.Update();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void cargasolicitudes()
|
||||
{
|
||||
using (ClsNominas nom = new ClsNominas())
|
||||
{
|
||||
|
||||
if (nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa,CveTipoSolicitud:3))
|
||||
if (nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa, CveTipoSolicitud: 3))
|
||||
{
|
||||
|
||||
GVSolicitudesPendientes.DataSource = nom.DtResultados.FiltraParametros("Estatus =0");
|
||||
@@ -182,7 +195,9 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
}
|
||||
protected void LnkShowSolicitudes_Click(object sender, EventArgs e)
|
||||
{
|
||||
TabPanel.ActiveTabIndex = 0;
|
||||
cargasolicitudes();
|
||||
|
||||
this.RegistraScript("$('#ModalViewSolicitudes').modal();");
|
||||
}
|
||||
|
||||
@@ -200,54 +215,75 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
bool Continuar = false;
|
||||
using (ClsNominas nom = new ClsNominas())
|
||||
{
|
||||
Continuar = nom.SolicitudesAdd(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa, CveTipoSolicitud:3);
|
||||
|
||||
Continuar = nom.SolicitudesAdd(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa, CveTipoSolicitud: 3);
|
||||
}
|
||||
|
||||
|
||||
if (Continuar)
|
||||
{
|
||||
|
||||
StringBuilder sbResultado = new StringBuilder();
|
||||
|
||||
var api = new GeneralesAPI();
|
||||
|
||||
JToken ObjApiSolicitud = (JToken) api.GeneraSolicitud(UsuarioActual.CveEmpresa, 3);
|
||||
List<string> resultSolicitud = ObjApiSolicitud.Select(token => token.Values().Aggregate((i, j) => $"{i}|{j}").Value<string>()).ToList();
|
||||
|
||||
var api = new GeneralesAPII();
|
||||
JToken ObjApiSolicitud = (JToken)api.GeneraSolicitud(UsuarioActual.CveEmpresa, 3);
|
||||
List<string> resultSolicitud = new List<string>();
|
||||
List<string> resultVerificacion = new List<string>();
|
||||
|
||||
|
||||
var ResultadoSolicitudOK = bool.Parse(resultSolicitud[0]);
|
||||
var ResultadoVerificaionOK = false;
|
||||
var SeVerifico = false;
|
||||
var TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion;
|
||||
var ResultadoSolicitudOK = false;
|
||||
|
||||
if (ResultadoSolicitudOK)
|
||||
if (!(ObjApiSolicitud == null))
|
||||
{
|
||||
JToken ObjApiVerificacion = (JToken) api.VerificaSolicitudesNominas(UsuarioActual.CveEmpresa, 3);
|
||||
resultVerificacion = ObjApiVerificacion.Select(token => token.Values().Aggregate((i, j) => $"{i}|{j}").Value<string>()).ToList();
|
||||
|
||||
ResultadoVerificaionOK = bool.Parse(resultVerificacion[0]);
|
||||
SeVerifico = true;
|
||||
resultSolicitud = ObjApiSolicitud.Select(token => token.Values().Aggregate((i, j) => $"{i}|{j}").Value<string>()).ToList();
|
||||
ResultadoSolicitudOK = bool.Parse(resultSolicitud[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
|
||||
|
||||
if (ResultadoSolicitudOK)
|
||||
{
|
||||
JToken ObjApiVerificacion = (JToken)api.VerificaSolicitudesNominas(UsuarioActual.CveEmpresa, 3);
|
||||
|
||||
|
||||
if (!(ObjApiVerificacion == null))
|
||||
{
|
||||
resultVerificacion = ObjApiVerificacion.Select(token => token.Values().Aggregate((i, j) => $"{i}|{j}").Value<string>()).ToList();
|
||||
ResultadoVerificaionOK = bool.Parse(resultVerificacion[0]);
|
||||
SeVerifico = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (resultSolicitud.Count == 4)
|
||||
{
|
||||
if (ResultadoSolicitudOK)
|
||||
{
|
||||
sbResultado.Append($"Solicitud Generada Correctamente <br/> {resultSolicitud[2]}");
|
||||
if (resultSolicitud[1].ToString().Trim().Length > 0)
|
||||
{
|
||||
sbResultado.Append($"{resultSolicitud[1]}<br/>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.Append($"Solicitud Generada Correctamente");
|
||||
sbResultado.Append($"Se presento un error al verificar las solicitudes <br/> {resultSolicitud[2]} <br>");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.Append($"Se presento un error al generar la solicitud <br/> {resultSolicitud[2]}");
|
||||
sbResultado.Append($"{resultSolicitud[2]}");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.AppendLine("Se presento un error al generar la solicitud (API) <br/>");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
|
||||
|
||||
@@ -255,30 +291,30 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
{
|
||||
if (ResultadoVerificaionOK)
|
||||
{
|
||||
sbResultado.Append($"Verificación ejecutada correctamente <br/> {resultSolicitud[2]}");
|
||||
sbResultado.Append($"{resultVerificacion[1]}<br>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.Append($"Se presento un error al verificar las solicitudes <br/> {resultSolicitud[2]}");
|
||||
sbResultado.Append($"Se presento un error al verificar las solicitudes {resultVerificacion[1]}<br>");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.AppendLine("Se presento un error al verificar las solicitudes (API) <br/>");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Alert(sbResultado.ToString());
|
||||
Alert(sbResultado.ToString(), TipoMensaje);
|
||||
}
|
||||
|
||||
if (Continuar)
|
||||
{
|
||||
txtFechaIAdd.Text = "";
|
||||
txtFechaFAdd.Text = "";
|
||||
this.RegistraScript("$('#DModalSolicitudesNominas').modal('hide');");
|
||||
this.RegistraScript("$('#ModalAgregarSolicitud').modal('hide');");
|
||||
cargasolicitudes();
|
||||
this.Alert("se a envia la solicitud al sat, le enviaremos un correo en cuanto tengamos una respuesta", ModExtensiones.TipoMensaje.ToastInformacion);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,45 +328,68 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
|
||||
|
||||
StringBuilder sbResultado = new StringBuilder();
|
||||
|
||||
var api = new GeneralesAPI();
|
||||
|
||||
var api = new GeneralesAPII();
|
||||
JToken ObjApiSolicitud = (JToken)api.GeneraSolicitud(UsuarioActual.CveEmpresa, 3);
|
||||
List<string> resultSolicitud = ObjApiSolicitud.Select(token => token.Values().Aggregate((i, j) => $"{i}|{j}").Value<string>()).ToList();
|
||||
|
||||
List<string> resultSolicitud = new List<string>();
|
||||
List<string> resultVerificacion = new List<string>();
|
||||
|
||||
|
||||
var ResultadoSolicitudOK = bool.Parse(resultSolicitud[0]);
|
||||
var ResultadoVerificaionOK = false;
|
||||
var SeVerifico = false;
|
||||
var TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion;
|
||||
var ResultadoSolicitudOK = false;
|
||||
|
||||
if (!(ObjApiSolicitud == null))
|
||||
{
|
||||
resultSolicitud = ObjApiSolicitud.Select(token => token.Values().Aggregate((i, j) => $"{i}|{j}").Value<string>()).ToList();
|
||||
ResultadoSolicitudOK = bool.Parse(resultSolicitud[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
|
||||
|
||||
if (ResultadoSolicitudOK)
|
||||
{
|
||||
JToken ObjApiVerificacion = (JToken)api.VerificaSolicitudesNominas(UsuarioActual.CveEmpresa, 3);
|
||||
resultVerificacion = ObjApiVerificacion.Select(token => token.Values().Aggregate((i, j) => $"{i}|{j}").Value<string>()).ToList();
|
||||
|
||||
ResultadoVerificaionOK = bool.Parse(resultVerificacion[0]);
|
||||
SeVerifico = true;
|
||||
|
||||
if (!(ObjApiVerificacion == null))
|
||||
{
|
||||
resultVerificacion = ObjApiVerificacion.Select(token => token.Values().Aggregate((i, j) => $"{i}|{j}").Value<string>()).ToList();
|
||||
ResultadoVerificaionOK = bool.Parse(resultVerificacion[0]);
|
||||
SeVerifico = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (resultSolicitud.Count == 4)
|
||||
{
|
||||
if (ResultadoSolicitudOK)
|
||||
{
|
||||
sbResultado.Append($"Solicitud Generada Correctamente <br/> {resultSolicitud[2]}");
|
||||
if (resultSolicitud[2].ToString().Trim().Length > 0)
|
||||
{
|
||||
sbResultado.Append($"{resultSolicitud[2]}<br/>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.Append($"Solicitud Generada Correctamente");
|
||||
sbResultado.Append($"Se presento un error al verificar las solicitudes <br/> {resultSolicitud[2]} <br>");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.Append($"Se presento un error al generar la solicitud <br/> {resultSolicitud[2]}");
|
||||
sbResultado.Append($"{resultSolicitud[2]}");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.AppendLine("Se presento un error al generar la solicitud (API) <br/>");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
|
||||
|
||||
@@ -338,37 +397,124 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
{
|
||||
if (ResultadoVerificaionOK)
|
||||
{
|
||||
sbResultado.Append($"Verificación ejecutada correctamente <br/> {resultSolicitud[2]}");
|
||||
sbResultado.Append($"{resultVerificacion[2]}<br>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.Append($"Se presento un error al verificar las solicitudes <br/> {resultSolicitud[2]}");
|
||||
sbResultado.Append($"Se presento un error al verificar las solicitudes {resultVerificacion[2]}<br>");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.AppendLine("Se presento un error al verificar las solicitudes (API) <br/>");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Alert(sbResultado.ToString());
|
||||
Alert(sbResultado.ToString(), TipoMensaje);
|
||||
|
||||
|
||||
|
||||
cargasolicitudes();
|
||||
|
||||
}
|
||||
|
||||
protected void LnkAgregarSolictud_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
txtFechaIAdd.Text = "";
|
||||
txtFechaFAdd.Text = "";
|
||||
UPModalViewSolicitudesAgregar.Update();
|
||||
this.RegistraScript("$('#ModalAgregarSolicitud').modal('show');");
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void GvResumen_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if(e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if(e.Row.DataKey("Mes").ToString() == "")
|
||||
{
|
||||
e.Row.Cells[0].Text = "Total";
|
||||
e.Row.Font.Bold = true;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
|
||||
if(e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (e.Row.DataKey("UUID") == "Totales")
|
||||
{
|
||||
|
||||
e.Row.Font.Bold = true;
|
||||
e.Row.Cells[1].Text = e.Row.DataKey("VTotal").ToDecimal().ToString("###,###,###.00");
|
||||
e.Row.Cells[2].Text = e.Row.DataKey("CBTTotal").ToDecimal().ToString("###,###,###.00");
|
||||
e.Row.Cells[3].Text = e.Row.DataKey("CountRegistros");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (e.Row.RowType == DataControlRowType.Header)
|
||||
{
|
||||
|
||||
e.Row.Cells[1].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[2].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
|
||||
|
||||
e.Row.Cells[4].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[5].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[6].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[7].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[8].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[9].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
|
||||
|
||||
e.Row.Cells[10].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
e.Row.Cells[11].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
e.Row.Cells[12].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
e.Row.Cells[13].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
e.Row.Cells[14].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
e.Row.Cells[15].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
|
||||
|
||||
e.Row.Cells[1].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[2].ForeColor = System.Drawing.Color.FromName("white");
|
||||
|
||||
e.Row.Cells[4].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[5].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[6].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[7].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[8].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[9].ForeColor = System.Drawing.Color.FromName("white");
|
||||
|
||||
|
||||
e.Row.Cells[10].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[11].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[12].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[13].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[14].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[15].ForeColor = System.Drawing.Color.FromName("white");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class GeneralesAPI : ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII.BaseSIGAPII
|
||||
|
||||
public class GeneralesAPII : ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII.BaseSIGAPII
|
||||
{
|
||||
public GeneralesAPI(string domainApi = "http://localhost:4001/", string token = "") : base(domainApi, token) { }
|
||||
public GeneralesAPII(string domainApi = "http://localhost:4001/", string token = "") : base(domainApi, token) { }
|
||||
|
||||
|
||||
public object GeneraSolicitud(int CveEmpresa, int CveTipoSolicitud)
|
||||
{
|
||||
return getData<object>($"GeneraSolicitud/{CveEmpresa}/{CveTipoSolicitud}", null, ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII.requestMethod.GET,false);
|
||||
return getData<object>($"GeneraSolicitud/{CveEmpresa}/{CveTipoSolicitud}", null, ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII.requestMethod.GET, false);
|
||||
}
|
||||
public object VerificaSolicitudesNominas(int CveEmpresa, int CveTipoSolicitud)
|
||||
{
|
||||
@@ -377,7 +523,7 @@ public class GeneralesAPI : ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII.BaseSIG
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
namespace ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII
|
||||
{
|
||||
|
||||
@@ -388,14 +534,15 @@ namespace ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII
|
||||
}
|
||||
public class BaseSIGAPII
|
||||
{
|
||||
private const string tituloLog = "ADSNetLibrary.Helpers.Conexiones.SIGAPI";
|
||||
private const string tituloLog = " ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII";
|
||||
public string domainApi;
|
||||
public string authorization;
|
||||
protected string RouteController = "";
|
||||
protected string FullRoute = "";
|
||||
public string GetRoutbyclass() {
|
||||
string classname = this.GetType().Name;
|
||||
return classname.Substring(0, classname.Length - 3);
|
||||
public string GetRoutbyclass()
|
||||
{
|
||||
string classname = this.GetType().Name;
|
||||
return classname.Substring(0, classname.Length - 4);
|
||||
}
|
||||
public string GetRoute(string path)
|
||||
{
|
||||
@@ -423,7 +570,7 @@ namespace ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII
|
||||
this.domainApi = domainApi;
|
||||
this.FullRoute = fullRoute;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -475,11 +622,13 @@ namespace ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII
|
||||
};
|
||||
objreturn = Newtonsoft.Json.JsonConvert.DeserializeObject<T>(jsondata, settings);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
//ModExtensiones.GuardaLog(string.Format("{0}{1}{2}{1}StatusCode:{3}{1}{4}{1}{5}{1}", tituloLog, ModVars.NewLine, route, response.StatusCode, response.RequestMessage, strjsonreq), ModVars.ADSNetLibraryLog);
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
catch (Exception e)
|
||||
{
|
||||
//ModExtensiones.GuardaLog(string.Format("{0}{1}{2}{1}{3}{1}{4}{1}", tituloLog, ModVars.NewLine, route, e, strjsonreq), ModVars.ADSNetLibraryLog);
|
||||
}
|
||||
|
||||
@@ -495,7 +644,7 @@ namespace ADSNetLibraryzI.HelpersI.ConexionesI.SIGAPII
|
||||
/// <param name="requestobject">request object.</param>
|
||||
/// <returns>Lista de objetos.</returns>
|
||||
//public T getData<T> (string path, object requestobject, requestMethod reqmet = requestMethod.POST, bool needauthorization = true, bool isfullpath = false) where T : class, new()
|
||||
public T getData<T>(string path, object requestobject, requestMethod reqmet = requestMethod.POST, bool needauthorization = true, bool isfullpath = false) where T : class, new()
|
||||
public T getData<T>(string path, object requestobject, requestMethod reqmet = requestMethod.POST, bool needauthorization = true, bool isfullpath = false) where T : class, new()
|
||||
{
|
||||
return AsyncHelper.RunSync<T>(() => getDataAsync<T>(path, requestobject, reqmet, needauthorization, isfullpath));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user