From e8ee1e8f4bc63fbd0a899585154bfaf3a053a52c Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 15 Jan 2024 17:34:26 -0700 Subject: [PATCH] Ordenamiento Fecha cirugia --- Inventarios/RepNotasSinAlmacen.aspx | 16 +++++++- Inventarios/RepNotasSinAlmacen.aspx.vb | 56 +++++++++++++++++--------- 2 files changed, 51 insertions(+), 21 deletions(-) diff --git a/Inventarios/RepNotasSinAlmacen.aspx b/Inventarios/RepNotasSinAlmacen.aspx index 4c77704d6..29512fb09 100644 --- a/Inventarios/RepNotasSinAlmacen.aspx +++ b/Inventarios/RepNotasSinAlmacen.aspx @@ -165,11 +165,23 @@ - + + - + + <%-- --%> + + + + + + + + + diff --git a/Inventarios/RepNotasSinAlmacen.aspx.vb b/Inventarios/RepNotasSinAlmacen.aspx.vb index df5bfc5e2..f9f62dee2 100644 --- a/Inventarios/RepNotasSinAlmacen.aspx.vb +++ b/Inventarios/RepNotasSinAlmacen.aspx.vb @@ -1,9 +1,10 @@ Imports System.Data Imports Extensiones -Imports Microsoft.Reporting.WebForms - -Partial Class RepNotasSinAlmacen +Imports Microsoft.Reporting.WebForms +Imports Stimulsoft.Report.QuickButtons.StiWpfQuickButtonAttribute +Partial Class RepNotasSinAlmacen Inherits ClsPaginas + #Region "propiedades" Private Property dt As DataTable @@ -57,10 +58,12 @@ Partial Class RepNotasSinAlmacen End Get Set(value As DataTable) ViewState("DtNotasSinAlmacenCompras") = value - End Set - End Property + End Set + End Property + + #End Region - + Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then @@ -82,8 +85,10 @@ Partial Class RepNotasSinAlmacen GvVentas.Columns(6).Visible = True GvVentas.Columns(7).Visible = True TxtFechaF.Text = NowADS.AddDays(3).ToShortDateString - CType(GvVentas.Columns(2), BoundField).DataFormatString = "{0:dd/MM/yyyy HH:mm}" - CType(GvVentas.Columns(2), BoundField).ItemStyle.Width = Unit.Pixel(120) + + GvVentas.Columns(0).ItemStyle.Width = Unit.Pixel(120) + 'CType(GvVentas.Columns(2), Literal).DataFormatString = "{0:dd/MM/yyyy HH:mm}" + 'CType(GvVentas.Columns(2), Literal).ItemStyle.Width = Unit.Pixel(120) End If End Sub @@ -194,16 +199,15 @@ Partial Class RepNotasSinAlmacen End If - UpFiltros.Update() - - End Sub - - + UpFiltros.Update() + End Sub + + #Region " EXPORTAR - PDF - EXCEL " Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - ImprimirPDFExcel("Excel") - End Sub - + ImprimirPDFExcel("Excel") + End Sub + #Region "P D F" Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LinkPDF.Click ImprimirPDFExcel() @@ -276,8 +280,10 @@ Partial Class RepNotasSinAlmacen e.Row.FCLinkButton("lnkAccion").Visible = False If GvCompras.Columns(4).Visible Then e.Row.Cells(4).Text = "" - End If - + End If + + + End If End If End Sub @@ -294,7 +300,7 @@ Partial Class RepNotasSinAlmacen Dim ObjCompras As New ClsCompras Dim ObjEventos As New ClsOIEventos - If ObjCompras.UpdateEstatusAlmacenDetalle(CveCompraDetalle, 1, Usuarioactual.CveUsuario) Then + If ObjCompras.UpdateEstatusAlmacenDetalle(CveCompraDetalle, 1, UsuarioActual.CveUsuario) Then If ObjEventos.AddEventoBitacora(String.Format("El producto: {0} se marcó como no recibido", PS), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompra) Then Alert("El producto se marcó como 'no recibido' correctamente.") End If @@ -308,4 +314,16 @@ Partial Class RepNotasSinAlmacen End Sub + + Protected Sub GvVentas_RowDataBound(sender As Object, e As GridViewRowEventArgs) + If e.Row.RowType = DataControlRowType.DataRow Then + + If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then ' es empresa hospitalaria + e.Row.Cells(2).Text = $"
{e.Row.DBCampo("Fecha").ToDateTime.ToString("dd/MM/yyyy")}
{e.Row.DBCampo("Fecha").ToDateTime.ToString("dd/MM/yyyy HH:mm")}" + Else + e.Row.Cells(2).Text = $"{e.Row.DBCampo("Fecha").ToDateTime.ToString("dd/MM/yyyy")}" + End If + + End If + End Sub End Class