Actualizar estatus de inventario en compras
This commit is contained in:
@@ -70,9 +70,11 @@ Partial Class RepNotasSinAlmacen
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaPermisos()
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
Dim TienePermisoDesmarcar As Boolean = UsuarioActual.TienePermisoProceso(278)
|
||||
GvVentas.Columns(4).Visible = TienePermisoImportes
|
||||
GvCompras.Columns(3).Visible = TienePermisoImportes
|
||||
GvCompras.Columns(3).Visible = TienePermisoImportes
|
||||
GvCompras.Columns(4).Visible = TienePermisoDesmarcar
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
TxtFechaF.Text = Date.Now.ToShortDateString
|
||||
@@ -261,12 +263,12 @@ Partial Class RepNotasSinAlmacen
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepNotasSinAlmacenCompras.rdlc", DtNotasSinAlmacenCompras, params, "RepNotasSinAlmacenCompras", Formato:=Formato)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub GvCompras_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If Not e.Row.DBCampo("CveCompraDetalle").ToEntero > 0 Then
|
||||
@@ -275,9 +277,31 @@ Partial Class RepNotasSinAlmacen
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).Text = e.Row.DBCampo("Fecha").ToDate.ToShortDateString
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(2).Text = "<a class=""Texto"" href=""/Compras/Proveedores.aspx?CveProveedor=" & e.Row.DBCampo("CveProveedor") & """>" & e.Row.DBCampo("RazonSocial") & "</a>"
|
||||
e.Row.Cells(2).Text = "<a class=""Texto"" href=""/Compras/Proveedores.aspx?CveProveedor=" & e.Row.DBCampo("CveProveedor") & """>" & e.Row.DBCampo("RazonSocial") & "</a>"
|
||||
Else
|
||||
If GvCompras.Columns(4).Visible Then
|
||||
e.Row.Cells(4).Text = ""
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnActulizarEstatus_Click(sender As Object, e As EventArgs)
|
||||
If UsuarioActual.TienePermisoProceso(278) Then
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Dim CveCompra As Integer = GvRow.DataKey("CveCompra")
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
If ObjCompras.UpdateEstatusAlmacen(CveCompra, 1) Then
|
||||
Alert("La compra se desmarco correctamente.")
|
||||
End If
|
||||
ObjCompras.Dispose()
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user