diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 8e7c0f8a7..8882bb2d9 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -295,7 +295,8 @@ Public Class ClsBancos Return Retorno End Function - Public Function AddBancos(Banco As String, Ejecutivo As String, Telefono As String, CveUsuario As Integer, CveEmpresa As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1") As Boolean + Public Function AddBancos(Banco As String, Ejecutivo As String, Telefono As String, CveUsuario As Integer, CveEmpresa As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1", + Optional CveSATBanco As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Banc_BancosAdd ") @@ -308,6 +309,7 @@ Public Class ClsBancos .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@IdContPaq", SqlDbType.Int).Value = IdContPaq .Add("@RFC", SqlDbType.VarChar).Value = RFC + .Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco End With Try @@ -326,7 +328,8 @@ Public Class ClsBancos Return Retorno End Function - Public Function UpdateBancos(Banco As String, Ejecutivo As String, Telefono As String, Estatus As Boolean, CveBanco As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1") As Boolean + Public Function UpdateBancos(Banco As String, Ejecutivo As String, Telefono As String, Estatus As Boolean, CveBanco As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1", + Optional CveSATBanco As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Banc_BancosUpdate") @@ -339,6 +342,7 @@ Public Class ClsBancos .Add("@CveBanco", SqlDbType.Int).Value = CveBanco .Add("@IdContPaq", SqlDbType.Int).Value = IdContPaq .Add("@RFC", SqlDbType.VarChar).Value = RFC + .Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco End With Try diff --git a/App_Code/ClsExportaciones.vb b/App_Code/ClsExportaciones.vb index 8670c2847..45ffee442 100644 --- a/App_Code/ClsExportaciones.vb +++ b/App_Code/ClsExportaciones.vb @@ -120,7 +120,8 @@ Public Class ClsExportaciones End Sub #Region "EXPORTACIONES" - Public Function GetExportacion(Optional CveExportacion As Integer = -1, Optional CveEmpresa As Integer = -1, Optional EsExportacion As Boolean = True, Optional FechaInicio As Date = MinFecha, Optional FechaFin As Date = MaxFecha) As Boolean + Public Function GetExportacion(Optional CveExportacion As Integer = -1, Optional CveEmpresa As Integer = -1, Optional EsExportacion As Boolean = True, Optional FechaInicio As Date = MinFecha, + Optional FechaFin As Date = MaxFecha, Optional CveSubProyecto As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Exp_ExportacionesRep") With SqlAdapter.SelectCommand.Parameters @@ -129,6 +130,7 @@ Public Class ClsExportaciones .Add("@EsExportacion", SqlDbType.Bit).Value = EsExportacion .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio .Add("@FechaFin", SqlDbType.Date).Value = FechaFin + .Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto End With Try SqlAdapter.Fill(Data) @@ -139,14 +141,15 @@ Public Class ClsExportaciones Return Retorno End Function - Public Function AddExportacion(NumeroPedimento As String, FechaPedimento As Date, CveVenta As Integer, TipoCambio As Decimal, TipoExportacion As Integer, CveExportacionEstatus As Integer, - CveClienteExportador As Integer, CveClienteImportador As Integer, CveClienteConsignatario As Integer, CveAgente As Integer, ClaveAduana As Integer, - CveProveedor As Integer, MedioTransporte As Integer, TipoContenedor As Integer, Sello1 As String, Sello2 As String, Sello3 As String, SCAC As String, - CAAT As String, ContenedorPlaca As String, CveEmpresa As Integer, CveUsuario As Integer, CveDirExportador As Integer, CveDirConsignatario As Integer, + Public Function AddExportacion(CveSubProyecto As Integer, NumeroPedimento As String, FechaPedimento As Date, CveVenta As Integer, TipoCambio As Decimal, TipoExportacion As Integer, + CveExportacionEstatus As Integer, CveClienteExportador As Integer, CveClienteImportador As Integer, CveClienteConsignatario As Integer, CveAgente As Integer, + ClaveAduana As Integer, CveProveedor As Integer, MedioTransporte As Integer, TipoContenedor As Integer, Sello1 As String, Sello2 As String, Sello3 As String, + SCAC As String, CAAT As String, ContenedorPlaca As String, CveEmpresa As Integer, CveUsuario As Integer, CveDirExportador As Integer, CveDirConsignatario As Integer, CveIncoterm As Integer, Notas As String, CvePedimento As Integer, CveAgenteExtranjero As Integer, ITN As String, Vinculacion As Boolean, EsExportacion As Boolean) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_Exp_ExportacionesAdd") With SqlAdapter.SelectCommand.Parameters + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@NumeroPedimento", SqlDbType.VarChar).Value = NumeroPedimento .Add("@FechaPedimento", SqlDbType.Date).Value = FechaPedimento .Add("@CveVenta", SqlDbType.Int).Value = CveVenta @@ -191,15 +194,16 @@ Public Class ClsExportaciones Return Retorno End Function - Public Function UpdateExportacion(CveExportacion As Integer, NumeroPedimento As String, FechaPedimento As Date, CveVenta As Integer, TipoCambio As Decimal, TipoExportacion As Integer, CveExportacionEstatus As Integer, - CveClienteExportador As Integer, CveClienteImportador As Integer, CveClienteConsignatario As Integer, CveAgente As Integer, ClaveAduana As Integer, - CveProveedor As Integer, MedioTransporte As Integer, TipoContenedor As Integer, Sello1 As String, Sello2 As String, Sello3 As String, SCAC As String, - CAAT As String, ContenedorPlaca As String, CveEmpresa As Integer, CveUsuario As Integer, CveDirExportador As Integer, CveDirConsignatario As Integer, - CveIncoterm As Integer, Notas As String, CvePedimento As Integer, CveAgenteExtranjero As Integer, ITN As String, Vinculacion As Boolean) As Boolean + Public Function UpdateExportacion(CveExportacion As Integer, CveSubProyecto As Integer, NumeroPedimento As String, FechaPedimento As Date, CveVenta As Integer, TipoCambio As Decimal, + TipoExportacion As Integer, CveExportacionEstatus As Integer, CveClienteExportador As Integer, CveClienteImportador As Integer, CveClienteConsignatario As Integer, + CveAgente As Integer, ClaveAduana As Integer, CveProveedor As Integer, MedioTransporte As Integer, TipoContenedor As Integer, Sello1 As String, Sello2 As String, + Sello3 As String, SCAC As String, CAAT As String, ContenedorPlaca As String, CveEmpresa As Integer, CveUsuario As Integer, CveDirExportador As Integer, + CveDirConsignatario As Integer, CveIncoterm As Integer, Notas As String, CvePedimento As Integer, CveAgenteExtranjero As Integer, ITN As String, Vinculacion As Boolean) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Exp_ExportacionesUpdate") With SqlAdapter.SelectCommand.Parameters .Add("@CveExportacion", SqlDbType.Int).Value = CveExportacion + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@NumeroPedimento", SqlDbType.VarChar).Value = NumeroPedimento .Add("@FechaPedimento", SqlDbType.Date).Value = FechaPedimento .Add("@CveVenta", SqlDbType.Int).Value = CveVenta diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index e315a33e6..8613d0d3c 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -324,6 +324,30 @@ Public Class ClsNominas End Try Return retorno End Function + + + Public Function GetAniversarioLaboral(fecha As String, cveEmpresa As Integer) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_RH_AniversarioLaboral", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@Fecha", SqlDbType.Date).Value = fecha + + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch Ex1 As SqlException + + Me.OnError("Ocurrió un error en aniversario laboral.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + OnError("Ocurrió un error en aniversario laboral.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return retorno + End Function + + + Public Function AutorizaCalculoAnual(CveEmpresa As Integer, CveUsuario As Integer, PersonalXml As String, Optional Numpagos As Integer = 1, Optional Ejercicio As Integer = 2023) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Nom_AutorizaCalculoAnual", CommandType.StoredProcedure) diff --git a/Bancos/CatBancos.aspx b/Bancos/CatBancos.aspx index 3fa839955..481fe7485 100644 --- a/Bancos/CatBancos.aspx +++ b/Bancos/CatBancos.aspx @@ -4,6 +4,16 @@ +
  • @@ -24,6 +34,12 @@ + +
    + + Banco SAT + + + Banco @@ -64,6 +80,13 @@
    + + Seleccione uno + + + + @@ -90,8 +113,22 @@ - + + + + + + + + Seleccione uno + + + + + @@ -142,10 +179,14 @@ -
    - -   -
    +
    +
    + +
    +
    + +
    +
    diff --git a/Bancos/CatBancos.aspx.vb b/Bancos/CatBancos.aspx.vb index 1784f8c16..ab30a2db6 100644 --- a/Bancos/CatBancos.aspx.vb +++ b/Bancos/CatBancos.aspx.vb @@ -19,13 +19,43 @@ Partial Class Bancos_CatBancos End Set End Property + Private Property DTBancosSAT As DataTable + Get + If ViewState("DTBancosSAT") Is Nothing Then + ViewState("DTBancosSAT") = New DataTable() + End If + Return DirectCast(ViewState("DTBancosSAT"), DataTable) + End Get + + Set(ByVal value As DataTable) + ViewState("DTBancosSAT") = value + End Set + End Property + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then + CargaBancosSAT() ViewState("Orden") = "" CargaDatos() End If End Sub + Private Sub CargaBancosSAT() + + Dim ObjBancos As New ClsBancos + + If ObjBancos.GetBancosSAT Then + DdlSatBanco.DataSource = ObjBancos.DtResultados + DTBancosSAT = ObjBancos.DtResultados + End If + + ObjBancos.Dispose() + + DdlSatBanco.DataBind() + DdlSatBanco.Items.Insert(0, New ListItem("Seleccione uno", "-1")) + + End Sub + Public Sub CargaDatos() Dim ObjBancos As New ClsBancos If ObjBancos.GetBancos() Then @@ -47,7 +77,8 @@ Partial Class Bancos_CatBancos Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click Dim ObjBancos As New ClsBancos - If ObjBancos.AddBancos(TxtBanco.Text.Trim, TxtEjecutivo.Text.Trim, TxtTelefono.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + If ObjBancos.AddBancos(TxtBanco.Text.Trim, TxtEjecutivo.Text.Trim, TxtTelefono.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveSATBanco:=DdlSatBanco.SelectedValue.ToEntero) Then + DdlSatBanco.SelectedValueExist(-1) TxtBanco.Text = "" TxtEjecutivo.Text = "" TxtTelefono.Text = "" @@ -68,24 +99,42 @@ Partial Class Bancos_CatBancos #Region "G V D A T O S" Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.RowIndex = 0 Then - e.Row.Cells(0).Width = Unit.Pixel(156) 'BANCO - e.Row.Cells(1).Width = Unit.Pixel(206) 'EJECUTIVO - e.Row.Cells(2).Width = Unit.Pixel(106) 'TELEFONO - e.Row.Cells(3).Width = Unit.Pixel(95) 'ESTATUS - e.Row.Cells(4).Width = Unit.Pixel(95) 'FECHA - e.Row.Cells(5).Width = Unit.Pixel(100) 'USUARIO - e.Row.Cells(6).Width = Unit.Pixel(100) 'EDITAR - e.Row.Cells(7).Width = Unit.Pixel(65) 'ELIMINAR + e.Row.Cells(0).Width = Unit.Pixel(156) 'BANCO SAT + e.Row.Cells(1).Width = Unit.Pixel(156) 'BANCO + e.Row.Cells(2).Width = Unit.Pixel(206) 'EJECUTIVO + e.Row.Cells(3).Width = Unit.Pixel(106) 'TELEFONO + e.Row.Cells(4).Width = Unit.Pixel(95) 'ESTATUS + e.Row.Cells(5).Width = Unit.Pixel(95) 'FECHA + e.Row.Cells(6).Width = Unit.Pixel(100) 'USUARIO + e.Row.Cells(7).Width = Unit.Pixel(65) 'EDITAR + e.Row.Cells(8).Width = Unit.Pixel(65) 'ELIMINAR End If + e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left - e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center + e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center - e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center + 'e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center + e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Center + End If + + If (e.Row.RowState And DataControlRowState.Edit) = DataControlRowState.Edit Then + Dim DdlSatBanco As DropDownList = e.Row.FCDropDownList("DdlSatBanco") + DdlSatBanco.ClearSelection() + DdlSatBanco.SelectedValue = Nothing + DdlSatBanco.Items.Clear() + DdlSatBanco.DataSource = DTBancosSAT + DdlSatBanco.DataBind() + DdlSatBanco.Items.Insert(0, New ListItem("Seleccione uno", "-1")) + DdlSatBanco.SelectedValueExist(e.Row.DataKey("CveSATBanco").ToString()) + End If + End Sub Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting @@ -126,19 +175,16 @@ Partial Class Bancos_CatBancos Dim Telefono As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtTelefono"), TextBox).Text.Trim Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked Dim CveBanco As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero + Dim CveSATBanco As Integer = GvDatos.Rows(e.RowIndex).FCDropDownList("DdlSatBanco").SelectedValue.ToEntero Dim TieneError As Boolean = False - If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco) Then - If ObjBancos.InhabilitarCuentasBancos(CveBanco, Estatus) Then - GvDatos.EditIndex = -1 - ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - GlobalDTBancos = ObjBancos.DtResultados - Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) - Else + If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco, CveSATBanco:=CveSATBanco) Then + + If Not ObjBancos.InhabilitarCuentasBancos(CveBanco, Estatus) Then TieneError = True End If + Else TieneError = True End If @@ -152,12 +198,24 @@ Partial Class Bancos_CatBancos ObjBancos.Dispose() - If ViewState("Orden").ToString() <> String.Empty Then - CargaGrid(ViewState("Orden").ToString()) - Else - CargaGrid("") + If Not TieneError Then + + GvDatos.EditIndex = -1 + CargaDatos() + GlobalDTBancos = Nothing + Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) + + If ViewState("Orden").ToString() <> String.Empty Then + CargaGrid(ViewState("Orden").ToString()) + Else + CargaGrid("") + End If + End If + + + End Sub Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing diff --git a/Export/ExpDetalle.aspx b/Export/ExpDetalle.aspx index fe76aeaae..d2ea20d0f 100644 --- a/Export/ExpDetalle.aspx +++ b/Export/ExpDetalle.aspx @@ -1,27 +1,32 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ExpDetalle.aspx.cs" Inherits="Export_ExpDetalle" %> - + - + - - + + Exportación: + - +
  • Exportar PDF
  • - + - + - +
    +
    + + +
    @@ -64,7 +69,7 @@
    Fecha de Pedimento: -
    - - - - - - - - - - - - - - -
    +
    + + + + + + + + + + + + + + +
    @@ -154,7 +159,7 @@ -
    +
    @@ -199,7 +204,7 @@
    -
    +
    @@ -219,7 +224,7 @@
    - +
    @@ -252,7 +257,7 @@
    -
    +
    @@ -290,7 +295,7 @@
    -
    +
    @@ -336,7 +341,7 @@
    -
    +
    @@ -389,7 +394,7 @@
    -
    +
    @@ -445,7 +450,7 @@
    -
    +
    @@ -464,7 +469,7 @@
    -
    +
    @@ -532,7 +537,7 @@
    -
    +
    @@ -612,106 +617,91 @@ - +

    - - - <%--asp:TemplateField HeaderText="Id" ItemStyle-HorizontalAlign="Left"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
    + + + <%--asp:TemplateField HeaderText="Id" ItemStyle-HorizontalAlign="Left"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - -   - - - - - - + + + + + + + + + + + + +
    @@ -731,115 +721,115 @@