Se cambiaron parametros de Fecha de Varchar a Date

This commit is contained in:
janeth arvizu
2019-10-03 10:29:17 -07:00
parent 096e679d06
commit 6b90d252a8
8 changed files with 24 additions and 24 deletions

View File

@@ -1702,13 +1702,13 @@ Public Class ClsInventarios
Return Retorno Return Retorno
End Function End Function
Public Function RepTraspasoAlmacen(FechaI As String, FechaF As String, CveAlmacenOrigen As Integer, CveAlmacenDestino As Integer, Recibido As Boolean, CveEmpresa As Integer) As Boolean Public Function RepTraspasoAlmacen(FechaI As Date, FechaF As Date, CveAlmacenOrigen As Integer, CveAlmacenDestino As Integer, Recibido As Boolean, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Inv_RepTraspasoAlmacen") DataAdapter("PA_Inv_RepTraspasoAlmacen")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI .Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF .Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveAlmacenOrigen", SqlDbType.Int).Value = CveAlmacenOrigen .Add("@CveAlmacenOrigen", SqlDbType.Int).Value = CveAlmacenOrigen
.Add("@CveAlmacenDestino", SqlDbType.Int).Value = CveAlmacenDestino .Add("@CveAlmacenDestino", SqlDbType.Int).Value = CveAlmacenDestino
.Add("@Recibido", SqlDbType.Bit).Value = Recibido .Add("@Recibido", SqlDbType.Bit).Value = Recibido

View File

@@ -2452,13 +2452,13 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function GetRepCotizacionesSinFacturar(FechaI As String, FechaF As String, CveSubProyecto As String, CveCliente As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1) As Boolean Public Function GetRepCotizacionesSinFacturar(FechaI As Date, FechaF As Date, CveSubProyecto As String, CveCliente As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RepCotizacionesSinFacturarGet") DataAdapter("PA_Vta_RepCotizacionesSinFacturarGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI .Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF .Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
@@ -2474,13 +2474,13 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function GetRepRemisionesNCSinFacturar(FechaI As String, FechaF As String, CveSubProyecto As String, CveCliente As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1) As Boolean Public Function GetRepRemisionesNCSinFacturar(FechaI As Date, FechaF As Date, CveSubProyecto As String, CveCliente As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RepRemisionesNCGet") DataAdapter("PA_Vta_RepRemisionesNCGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI .Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF .Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa

View File

@@ -186,7 +186,7 @@
</div> </div>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun corte" <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun Traspaso de Almacén"
ToolTip="Remisiones sin Facturar" ToolTip="Remisiones sin Facturar"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
data-sort="true" Style="text-align: center;" GridLines="None"> data-sort="true" Style="text-align: center;" GridLines="None">

View File

@@ -53,7 +53,7 @@ Partial Class RepTraspasoAlmacen
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
txtFechaI.Text = Now.Day.ToString + "/" + (Now.Month - 6).ToString + "/" + Now.Year.ToString txtFechaI.Text = Now.ToShortDateString
txtFechaF.Text = Now.ToShortDateString txtFechaF.Text = Now.ToShortDateString
CargaAlmacenOrigen() CargaAlmacenOrigen()
@@ -68,13 +68,13 @@ Partial Class RepTraspasoAlmacen
Public Sub CargaDatos() Public Sub CargaDatos()
Dim ObjInventarios As New ClsInventarios Dim ObjInventarios As New ClsInventarios
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), MinFecha.ToShortDateString)
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), MaxFecha.ToShortDateString)
'CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1) 'CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
'Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString 'Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
If ObjInventarios.RepTraspasoAlmacen(FechaI, FechaF, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, ChkRecibido.Checked, UsuarioActual.CveEmpresa) Then If ObjInventarios.RepTraspasoAlmacen(FechaI.ToDate, FechaF.ToDate, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, ChkRecibido.Checked, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjInventarios.DtResultados GvDatos.DataSource = ObjInventarios.DtResultados
DtInventarios = ObjInventarios.DtResultados DtInventarios = ObjInventarios.DtResultados
GvDatos.DataBind() GvDatos.DataBind()

View File

@@ -207,7 +207,7 @@
</div> </div>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun corte" DataKeyNames="CveVenta" <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cotizaciones por Facturar" DataKeyNames="CveVenta"
ToolTip="Remisiones sin Facturar" ToolTip="Remisiones sin Facturar"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
data-sort="true" Style="text-align: center;" GridLines="None"> data-sort="true" Style="text-align: center;" GridLines="None">

View File

@@ -53,7 +53,7 @@ Partial Class RepCotizacionesxFacturar
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
txtFechaI.Text = Now.Day.ToString + "/" + (Now.Month - 6).ToString + "/" + Now.Year.ToString txtFechaI.Text = Now.ToShortDateString
txtFechaF.Text = Now.ToShortDateString txtFechaF.Text = Now.ToShortDateString
CargaSucursales() CargaSucursales()
@@ -68,13 +68,13 @@ Partial Class RepCotizacionesxFacturar
Public Sub CargaDatos() Public Sub CargaDatos()
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), MinFecha.ToShortDateString)
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), MaxFecha.ToShortDateString)
CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1) CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
If ObjVentas.GetRepCotizacionesSinFacturar(FechaI, FechaF, Sucursales, CveCliente, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then If ObjVentas.GetRepCotizacionesSinFacturar(FechaI.ToDate, FechaF.ToDate, Sucursales, CveCliente, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados
GvDatos.DataBind() GvDatos.DataBind()

View File

@@ -207,7 +207,7 @@
</div> </div>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun corte" DataKeyNames="CveVenta" <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Remisiones de NC Sin Aplicar" DataKeyNames="CveVenta"
ToolTip="Remisiones sin Facturar" ToolTip="Remisiones sin Facturar"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
data-sort="true" Style="text-align: center;" GridLines="None"> data-sort="true" Style="text-align: center;" GridLines="None">

View File

@@ -53,7 +53,7 @@ Partial Class RepRemisionesNC
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
txtFechaI.Text = Now.Day.ToString + "/" + (Now.Month - 6).ToString + "/" + Now.Year.ToString txtFechaI.Text = Now.ToShortDateString
txtFechaF.Text = Now.ToShortDateString txtFechaF.Text = Now.ToShortDateString
CargaSucursales() CargaSucursales()
@@ -68,13 +68,13 @@ Partial Class RepRemisionesNC
Public Sub CargaDatos() Public Sub CargaDatos()
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), MinFecha.ToShortDateString)
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), MaxFecha.ToShortDateString)
CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1) CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
If ObjVentas.GetRepRemisionesNCSinFacturar(FechaI, FechaF, Sucursales, CveCliente, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then If ObjVentas.GetRepRemisionesNCSinFacturar(FechaI.ToDate, FechaF.ToDate, Sucursales, CveCliente, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados
GvDatos.DataBind() GvDatos.DataBind()