-- option strict on

This commit is contained in:
2023-08-23 00:04:25 -07:00
parent 3bc4f72658
commit e5c000432f
28 changed files with 192 additions and 279 deletions

View File

@@ -80,29 +80,10 @@ Partial Class Acumuladores_CatFoliosGarantia
objAcum.Dispose()
UPGvFolioGarantia.DataBind()
UpGral.Update()
'CargaGvTamanioBitacora()
End Sub
'Private Sub CargaGvTamanioBitacora()
' Dim objAcum As New ClsAcumuladores
' If objAcum.TamañoBitacoraGet(UsuarioActual.Empresa.CveEmpresa) Then
' GvBitacora.DataSource = objAcum.DtResultados
' Else
' GvBitacora.DataSource = Nothing
' End If
' objAcum.Dispose()
' UpGvBitacora.DataBind()
' UpGral.Update()
'End Sub
UpGral.Update()
End Sub
Protected Sub BtnAgregarFolioGarantia_Click(sender As Object, e As EventArgs) Handles BtnAgregarFolioGarantia.Click
LtlTituloModalFolioGarantia.Text = "Agregar Folio Garantía"
BtnAgregarFolioGarantiaModal.Text = "Agregar"
@@ -180,8 +161,7 @@ Partial Class Acumuladores_CatFoliosGarantia
Public Sub Remove_ClickFolioGarantia(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim activo As Boolean = 0
Dim CveCapacitador As Integer = GvRow.DataKey("CveFolioGarantia")
Dim CveCapacitador As Integer = GvRow.DataKey("CveFolioGarantia").ToEntero
Dim objAcum As New ClsAcumuladores
If objAcum.FoliosGarantiaRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
@@ -199,12 +179,9 @@ Partial Class Acumuladores_CatFoliosGarantia
Public Sub Edit_ClickFolioGarantia(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim activo As Boolean = 0
LtlTituloModalFolioGarantia.Text = "Editar Folio Garantía"
Actualizar = True
CveFolioGarantia = GvRow.DataKey("CveFolioGarantia")
CveFolioGarantia = GvRow.DataKey("CveFolioGarantia").ToEntero
TxtFolioGarantia.Text = GvRow.DataKey("FolioGarantia")
DdlEstatusEditar.SelectedValueExist(GvRow.DataKey("CveEstatus"))
@@ -233,8 +210,8 @@ Partial Class Acumuladores_CatFoliosGarantia
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
CveFolioGarantia = GvRow.DataKey("CveFolioGarantia")
CveMovimiento = IIf(GvRow.DataKey("CveMovimiento") <> "", GvRow.DataKey("CveMovimiento"), -1)
CveFolioGarantia = GvRow.DataKey("CveFolioGarantia").ToEntero
CveMovimiento = If(GvRow.DataKey("CveMovimiento") <> "", GvRow.DataKey("CveMovimiento").ToEntero, -1)
LblFolio.Text = GvRow.DataKey("FolioGarantia")
Using ObjAcum As New ClsAcumuladores
@@ -252,9 +229,6 @@ Partial Class Acumuladores_CatFoliosGarantia
End Sub
#End Region
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)

View File

@@ -91,10 +91,10 @@ Partial Class Acumuladores_CatFoliosGarantia
BtnAgregarFolioGarantiaModal.Text = "Agregar"
CargaCombosModal()
If DdlMarca.SelectedValue <> -1 Then DdlMarcaM.SelectedValueExist(DdlMarca.SelectedValue.ToEntero)
If DdlTipoUso.SelectedValue <> -1 Then DdlTipoUsoM.SelectedValueExist(DdlTipoUso.SelectedValue.ToEntero)
If DdlMarca.SelectedValue <> "-1" Then DdlMarcaM.SelectedValueExist(DdlMarca.SelectedValue.ToEntero)
If DdlTipoUso.SelectedValue <> "-1" Then DdlTipoUsoM.SelectedValueExist(DdlTipoUso.SelectedValue.ToEntero)
TxtMes.Text = TxtMes.Text.ToEntero + 1
TxtMes.Text = (TxtMes.Text.ToEntero + 1).ToString
TxtValor.Text = ""
TxtMes.Focus()
@@ -128,7 +128,7 @@ Partial Class Acumuladores_CatFoliosGarantia
If Not Actualizar Then
If ObjAcum.GarantiasMesesAdd(DdlMarcaM.SelectedValue.ToEntero, DdlTipoUsoM.SelectedValue.ToEntero, TxtMes.Text.ToEntero, TxtValor.Text.ToDecimal, txtFechaI.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
TxtMes.Text = TxtMes.Text.ToEntero + 1
TxtMes.Text = (TxtMes.Text.ToEntero + 1).ToString
TxtValor.Text = ""
TxtMes.Focus()
@@ -180,8 +180,7 @@ Partial Class Acumuladores_CatFoliosGarantia
Dim objAcum As New ClsAcumuladores
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim activo As Boolean = 0
Dim CveCapacitador As Integer = GvRow.DataKey("CveGarantiaMes")
Dim CveCapacitador As Integer = GvRow.DataKey("CveGarantiaMes").ToEntero
If objAcum.GarantiasMesesRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
CargadatosGvFolioGarantia()
@@ -202,12 +201,10 @@ Partial Class Acumuladores_CatFoliosGarantia
Public Sub Edit_ClickFolioGarantia(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim activo As Boolean = 0
LtlTituloModalFolioGarantia.Text = "Editar Garantía de Mes"
Actualizar = True
CveGarantiaMes = GvRow.DataKey("CveGarantiaMes")
CveGarantiaMes = GvRow.DataKey("CveGarantiaMes").ToEntero
TxtMes.Text = GvRow.DataKey("Mes")
TxtValor.Text = GvRow.DataKey("Valor")

View File

@@ -169,8 +169,7 @@ Partial Class Acumuladores_CatTiposDefecto
Dim objAcum As New ClsAcumuladores
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim activo As Boolean = 0
Dim CveCapacitador As Integer = GvRow.DataKey("CveTipoDefecto")
Dim CveCapacitador As Integer = GvRow.DataKey("CveTipoDefecto").ToEntero
If objAcum.TiposDefectoRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
CargadatosGvTiposD()
@@ -192,12 +191,11 @@ Partial Class Acumuladores_CatTiposDefecto
Public Sub Edit_ClickTiposD(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim activo As Boolean = 0
LtlTituloModalTiposD.Text = "Editar Tipo Defecto"
Actualizar = True
CveTipoDefecto = GvRow.DataKey("CveTipoDefecto")
CveTipoDefecto = GvRow.DataKey("CveTipoDefecto").ToEntero
TxtTiposD.Text = GvRow.DataKey("TipoDefecto")
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)

View File

@@ -170,8 +170,7 @@ Partial Class Acumuladores_CatTiposUso
Dim objAcum As New ClsAcumuladores
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim activo As Boolean = 0
Dim CveCapacitador As Integer = GvRow.DataKey("CveTipoUso")
Dim CveCapacitador As Integer = GvRow.DataKey("CveTipoUso").ToEntero
If objAcum.TiposUsoRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
CargadatosGvTiposUso()
@@ -193,12 +192,10 @@ Partial Class Acumuladores_CatTiposUso
Public Sub Edit_ClickTiposUso(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim activo As Boolean = 0
LtlTituloModalTiposUso.Text = "Editar Tipo Uso"
Actualizar = True
CveTipoUso = GvRow.DataKey("CveTipoUso")
CveTipoUso = GvRow.DataKey("CveTipoUso").ToEntero
TxtTiposUso.Text = GvRow.DataKey("TipoUso")
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
@@ -216,10 +213,6 @@ Partial Class Acumuladores_CatTiposUso
End Sub
#End Region
End Class

View File

@@ -22,8 +22,8 @@ Partial Class Acumuladores_RepEntradasUsados
Protected Sub Page_Load() Handles Me.Load
If Not IsPostBack Then
txtFechaI.Text = Today.AddDays((-1) * (Today.Day - 1))
txtFechaF.Text = Today
txtFechaI.Text = Today.AddDays((-1) * (Today.Day - 1)).ToShortDateString
txtFechaF.Text = Today.ToShortDateString
CargarDatos()
CargarCombos()
End If
@@ -40,14 +40,14 @@ Partial Class Acumuladores_RepEntradasUsados
Dim i As Integer
If Cargado = 0 Then
For i = Date.Now.Year.ToEntero To (fecha.Year.ToEntero - 5) Step -1
Años = New ListItem(i, i)
Años = New ListItem(i.ToString, i.ToString)
DdlAño.Items.Add(Años)
Next
End If
Cargado = 1
DdlAño.SelectedValue = fecha.Year.ToEntero
DdlMes.SelectedValue = fecha.Month.ToEntero
DdlAño.SelectedValue = fecha.Year.ToString
DdlMes.SelectedValue = fecha.Month.ToString
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
@@ -55,7 +55,7 @@ Partial Class Acumuladores_RepEntradasUsados
BtnImprimir.Visible = False
If ObjAcum.EntradasUsadosGet(UsuarioActual.CveEmpresa, DdlAlmacenes.SelectedValue.ToEntero, txtFechaI.Text, txtFechaF.Text) Then
If ObjAcum.EntradasUsadosGet(UsuarioActual.CveEmpresa, DdlAlmacenes.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate) Then
GvAcum.DataSource = ObjAcum.DtResultados
DatosEntradasUsados = ObjAcum.DtResultados
@@ -115,10 +115,10 @@ Partial Class Acumuladores_RepEntradasUsados
Dim dt As DataTable
Dim NombreArchivo As String
Try
If DdlOpcion.SelectedValue = 1 Then
If DdlOpcion.SelectedValue = "1" Then
ObjAcum.GetSabanaVenta(Fecha, 1, UsuarioActual.CveEmpresa)
ElseIf DdlOpcion.SelectedValue = 2 Then
ElseIf DdlOpcion.SelectedValue = "2" Then
ObjAcum.GetSabanaVenta(Fecha, 2, UsuarioActual.CveEmpresa)
End If
@@ -151,12 +151,11 @@ Partial Class Acumuladores_RepEntradasUsados
If Mes.ToEntero < 10 Then
Mes = String.Format("0{0}", Mes)
End If
If DdlOpcion.SelectedValue = 1 Then
If DdlOpcion.SelectedValue = "1" Then
NombreArchivo = String.Format("700415-{0}{1}-GE", Mes, Año)
workbook.Save(Response, $"{NombreArchivo}.xlsx", SaveOptions.XlsxDefault)
ElseIf DdlOpcion.SelectedValue = 2 Then
ElseIf DdlOpcion.SelectedValue = "2" Then
NombreArchivo = String.Format("700415-{0}{1}-CS", Mes, Año)
workbook.Save(Response, $"{NombreArchivo}.xlsx", SaveOptions.XlsxDefault)

View File

@@ -36,8 +36,8 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
DdlAlmacen.DataBind()
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
TxtFechaI.text = now.Firstdayofmonth
txtfechaf.text = now.toshortdatestring
TxtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
TxtFechaF.text = now.toshortdatestring
End Sub
@@ -152,7 +152,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
LbTam.Text = renglon.DataKey("Codigo_Clientes")
Dim CveAlmacen As Integer = -1
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.EntradasUsadosClientesDetalleRep(renglon.DataKey("EsDistribuidor"), renglon.DataKey("CveCliente"), renglon.DataKey("CvePS"), TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, CveAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
If ObjAcum.EntradasUsadosClientesDetalleRep(CBool(renglon.DataKey("EsDistribuidor")), renglon.DataKey("CveCliente").ToEntero, renglon.DataKey("CvePS").ToEntero, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, CveAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
GvVentas.DataSource = ObjAcum.DtResultados
End If
ObjAcum.Dispose()

View File

@@ -114,7 +114,6 @@ Partial Class Acumuladores_Tamaños
Protected Sub BtnAgregarTamanioModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarTamanioModal.Click
Dim ObjAcum As New ClsAcumuladores
Dim Cargo, Bonificacion, Compra, Puntos As Decimal
Cargo = If(TxtCargo.Text.ToDecimal > 0, TxtCargo.Text.ToDecimal, -1)
@@ -123,8 +122,6 @@ Partial Class Acumuladores_Tamaños
Puntos = If(TxtPuntos.Text.ToDecimal > 0, TxtPuntos.Text.ToDecimal, -1)
If Not Actualizar Then
If ObjAcum.TamañoAdd(TxtTamanio.Text, Cargo, Bonificacion, Compra, Puntos, DdlPS.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
@@ -175,8 +172,8 @@ Partial Class Acumuladores_Tamaños
Dim objAcum As New ClsAcumuladores
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim activo As Boolean = 0
Dim CveCapacitador As Integer = GvRow.DataKey("CveTamaño")
Dim activo As Boolean = False
Dim CveCapacitador As Integer = GvRow.DataKey("CveTamaño").ToEntero
If objAcum.TamañoRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
CargadatosGvTamanio()
@@ -197,12 +194,11 @@ Partial Class Acumuladores_Tamaños
Public Sub Edit_ClickTamanio(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim activo As Boolean = 0
LtlTituloModalTamanio.Text = "Editar Tamaño"
Actualizar = True
CveTamaño = GvRow.DataKey("CveTamaño")
CveTamaño = GvRow.DataKey("CveTamaño").ToEntero
TxtTamanio.Text = GvRow.DataKey("Tamaño")
TxtCargo.Text = GvRow.DataKey("Cargo").ToDecimal.ToString("###,###,###.00")