Commit inicial Ventas Productivo

This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2019-08-14 16:40:54 -07:00
commit c35cf91883
13328 changed files with 3711549 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
Imports System.Data
Imports Extensiones
Partial Class Inventarios_Paquetes
Inherits ClsPaginas
#Region "Propiedades"
Public Property dtPaquetes() As DataTable
Get
Return CType(ViewState("dtPaquetes"), DataTable)
End Get
Set(value As DataTable)
ViewState("dtPaquetes") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaDatos()
End If
End Sub
Private Sub CargaDatos()
Dim ps As New ClsProductosServicios
If ps.GetPS(-1, -1, UsuarioActual.CveEmpresa, "-1", "-1", 1) Then
gvPaquetes.DataSource = ps.DtResultados
dtPaquetes = ps.DtResultados
End If
gvPaquetes.EditIndex = -1
gvPaquetes.DataBind()
ps.Dispose()
End Sub
Protected Sub gvPaquetes_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles gvPaquetes.RowEditing
gvPaquetes.DataSource = dtPaquetes
gvPaquetes.EditIndex = e.NewEditIndex
gvPaquetes.DataBind()
End Sub
Protected Sub gvPaquetes_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles gvPaquetes.RowCancelingEdit
gvPaquetes.EditIndex = -1
gvPaquetes.DataSource = dtPaquetes
gvPaquetes.DataBind()
End Sub
Protected Sub gvPaquetes_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles gvPaquetes.RowUpdating
Dim pq As New ClsProductosServicios
Dim PS As String = DirectCast(gvPaquetes.Rows(e.RowIndex).FindControl("txtEPS"), TextBox).Text.ToString
Dim Precio As Double = DirectCast(gvPaquetes.Rows(e.RowIndex).FindControl("txtEPrecio"), TextBox).Text.ToDouble
Dim Estado As Boolean = DirectCast(gvPaquetes.Rows(e.RowIndex).FindControl("cbEEstado"), CheckBox).Checked
If pq.UpdatePaquete(dtPaquetes.Rows.Item(e.RowIndex)("CvePS").ToString.ToEntero, PS, Precio, Estado) Then
CargaDatos()
End If
pq.Dispose()
End Sub
End Class