-
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports iText.Barcodes.Dmcode
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Ventas_RepEntregasEcommerce
|
||||
@@ -10,12 +9,11 @@ Partial Class Ventas_RepEntregasEcommerce
|
||||
If Not Page.IsPostBack Then
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
txtFechaI.Text = NowADS.AddDays(-3).ToShortDateString
|
||||
txtFechaI.Text = NowADS.AddDays(-5).ToShortDateString
|
||||
txtFechaF.Text = NowADS.ToShortDateString
|
||||
End Sub
|
||||
|
||||
@@ -25,11 +23,20 @@ Partial Class Ventas_RepEntregasEcommerce
|
||||
If txtFechaI.Text <> "" Then FechaI = txtFechaI.Text.Trim.ToDate Else FechaI = MinFecha
|
||||
If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text.Trim.ToDate Else FechaF = MaxFecha
|
||||
Dim Obj As New ClsVentas
|
||||
If Obj.GetEntregasEcommerce(FechaI, FechaF, 1, UsuarioActual.CveEmpresa) Then
|
||||
GvD.DataSource = Obj.DtResultados
|
||||
If Obj.GetEntregasEcommerce(FechaI, FechaF, RBL.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
If RBL.SelectedValue = "1" Then
|
||||
GvD.DataSource = Obj.DtResultados
|
||||
GvD.Visible = True : GvR.Visible = False
|
||||
Else
|
||||
GvR.DataSource = Obj.DtResultados
|
||||
GvR.Visible = True : GvD.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
Obj.Dispose()
|
||||
GvD.DataBind()
|
||||
GvR.DataBind()
|
||||
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
@@ -127,13 +134,38 @@ Partial Class Ventas_RepEntregasEcommerce
|
||||
|
||||
Private Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CvePS") = "" Then e.Row.CssClass = "SubTotales"
|
||||
If e.Row.DBCampo("CvePS") = "" Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
If e.Row.DBCampo("HMO").ToDecimal >= e.Row.DBCampo("Cantidad").ToDecimal Then e.Row.FCButton("BtnHMO").Visible = True
|
||||
If e.Row.DBCampo("CUL").ToDecimal >= e.Row.DBCampo("Cantidad").ToDecimal Then e.Row.FCButton("BtnCUL").Visible = True
|
||||
If e.Row.DBCampo("Mex").ToDecimal >= e.Row.DBCampo("Cantidad").ToDecimal Then e.Row.FCButton("BtnMex").Visible = True
|
||||
If e.Row.DBCampo("LP").ToDecimal >= e.Row.DBCampo("Cantidad").ToDecimal Then e.Row.FCButton("BtnLP").Visible = True
|
||||
e.Row.FCLabel("LblHmo").Visible = False
|
||||
e.Row.FCLabel("LblCUL").Visible = False
|
||||
e.Row.FCLabel("LblMex").Visible = False
|
||||
e.Row.FCLabel("LblLP").Visible = False
|
||||
Else
|
||||
If e.Row.DBCampo("CveAlmacenTraspasoOrigen") <> "" Then
|
||||
Dim tCve As Integer = e.Row.DBCampo("CveAlmacenTraspasoOrigen").ToEntero
|
||||
Dim tCol As Integer = If(tCve = 153, 4, If(tCve = 271, 5, If(tCve = 275, 6, 7)))
|
||||
e.Row.Cells(tCol).BackColor = Drawing.Color.LightGreen
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Private Sub GvD_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvD.RowCommand
|
||||
If e.CommandName <> "" Then
|
||||
Dim ObjSurtir As New ClsInventarios
|
||||
If ObjSurtir.UpdateAlmacenTraspasoOrigen(e.CommandName.ToEntero, e.CommandArgument.ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Se asignó el almacen por surtir.")
|
||||
End If
|
||||
ObjSurtir.Dispose()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user