Clientes busqueda cuenta, correcion descarga documentos cat documentos, ajustes servicio domicilio
This commit is contained in:
@@ -264,7 +264,8 @@ Public Class ClsClientes
|
|||||||
End Sub
|
End Sub
|
||||||
Public Function GetClientes(CveCliente As Integer, Nombre As String, Codigo As String, NombreCorto As String, RFC As String, Telefono As String, Mail As String, CveSubProyecto As Integer,
|
Public Function GetClientes(CveCliente As Integer, Nombre As String, Codigo As String, NombreCorto As String, RFC As String, Telefono As String, Mail As String, CveSubProyecto As Integer,
|
||||||
CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional Notificar As String = "-1", Optional CvePrecioLista As Integer = -1, Optional CveClienteClasificacion As Integer = -1,
|
CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional Notificar As String = "-1", Optional CvePrecioLista As Integer = -1, Optional CveClienteClasificacion As Integer = -1,
|
||||||
Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveUsuarioConsulta As Integer = -1) As Boolean
|
Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveUsuarioConsulta As Integer = -1,
|
||||||
|
Optional Cuenta As String = "-1") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_ClientesGet")
|
DataAdapter("PA_ClientesGet")
|
||||||
@@ -287,6 +288,8 @@ Public Class ClsClientes
|
|||||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||||
.Add("@PermiteCredito", SqlDbType.Int).Value = PermiteCreditoFiltro
|
.Add("@PermiteCredito", SqlDbType.Int).Value = PermiteCreditoFiltro
|
||||||
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
|
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
|
||||||
|
.Add("@Cuenta", SqlDbType.VarChar).Value = Cuenta
|
||||||
|
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
<div class="portlet solid grey-cascade portlet-filter" style="" id="DVFILTROS">
|
||||||
<div class="portlet-title portlet-filterT" style="">
|
<div class="portlet-title portlet-filterT" style="">
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||||
@@ -124,10 +124,10 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</li>
|
</li>
|
||||||
<li>Cuenta:
|
<li>Cuenta:
|
||||||
<asp:Textbox runat="server" ID="TxtCuenta" Width="120px"/>
|
<asp:Textbox runat="server" ID="TxtCuenta" Width="120px" Height="30px" />
|
||||||
</li>
|
</li>
|
||||||
<li>Moneda:
|
<li>Moneda:
|
||||||
<asp:DropDownList ID="DdlMoneda" CssClass="select2me" runat="server" AppendDataBoundItems="true" DataTextField="Moneda" DataValueField="CveMoneda" Width="80px">
|
<asp:DropDownList ID="DdlMoneda" CssClass="select2me" runat="server" AppendDataBoundItems="true" DataTextField="Moneda" DataValueField="CveMoneda" Width="120PX">
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -69,13 +69,13 @@ Partial Class Bancos_RepCxCCliente
|
|||||||
Mov.Dispose()
|
Mov.Dispose()
|
||||||
GvCxC.DataBind()
|
GvCxC.DataBind()
|
||||||
|
|
||||||
If (GvCxC.Rows.Count > 0) Then
|
'If (GvCxC.Rows.Count > 0) Then
|
||||||
GvCxC.UseAccessibleHeader = True
|
GvCxC.UseAccessibleHeader = True
|
||||||
GvCxC.HeaderRow.TableSection = TableRowSection.TableHeader
|
GvCxC.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||||
RegistraScript("OrdenarGV();")
|
RegistraScript("OrdenarGV();")
|
||||||
|
UPDatos.Update()
|
||||||
|
|
||||||
UPDatos.Update()
|
'End If
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCxC.RowDataBound
|
Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCxC.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|||||||
@@ -1084,6 +1084,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
Dim DTConceptos As DataTable
|
Dim DTConceptos As DataTable
|
||||||
Private Property EmpresasOC As List(Of Integer)
|
Private Property EmpresasOC As List(Of Integer)
|
||||||
Get
|
Get
|
||||||
@@ -1185,6 +1186,18 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property EsDevolucionApoyoLogistico As Boolean
|
||||||
|
Get
|
||||||
|
|
||||||
|
If ViewState("EsDevolucionApoyoLogistico") Is Nothing Then
|
||||||
|
ViewState("EsDevolucionApoyoLogistico") = False
|
||||||
|
End If
|
||||||
|
Return CType(ViewState("EsDevolucionApoyoLogistico"), Boolean)
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("EsDevolucionApoyoLogistico") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
@@ -1610,7 +1623,13 @@ Partial Class Compras_Compras
|
|||||||
NCSeleccionFacturasRelacionadas(UUIDSList)
|
NCSeleccionFacturasRelacionadas(UUIDSList)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If CveFactura > 0 AndAlso Serie Isnot nothing AndAlso Serie.ToUpper = "NL" AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
EsDevolucionApoyoLogistico = True
|
||||||
|
DdlTipoComprobante.Items.Clear()
|
||||||
|
DdlTipoComprobante.Items.Add(New ListItem("Devolución", "DEV"))
|
||||||
|
DdlTipoComprobante.SelectedValueExist("DEV")
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -5527,6 +5546,8 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue = "Fac" Then
|
If DdlTipoComprobante.SelectedValue = "Fac" Then
|
||||||
|
|
||||||
|
|
||||||
For Each tCveAlmacen As Integer In ListAlmacenes
|
For Each tCveAlmacen As Integer In ListAlmacenes
|
||||||
If GvInv.Rows(indice).FCDropDownList("DdlRecibirInv").SelectedValue = "1" Then
|
If GvInv.Rows(indice).FCDropDownList("DdlRecibirInv").SelectedValue = "1" Then
|
||||||
Continue For
|
Continue For
|
||||||
@@ -5553,7 +5574,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
ListaMovimientosAlmacen.Add(CveMovimientoInventario)
|
ListaMovimientosAlmacen.Add(CveMovimientoInventario)
|
||||||
|
|
||||||
|
Dim contadorAlamcen As Integer = 0
|
||||||
For Each Dr As DataRow In DtInv.Rows
|
For Each Dr As DataRow In DtInv.Rows
|
||||||
|
|
||||||
CveProducto = Dr("CvePS").ToString.ToEntero
|
CveProducto = Dr("CvePS").ToString.ToEntero
|
||||||
@@ -5594,22 +5615,26 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'si no es por serie lote
|
|
||||||
ImporteConcepto = If(DdlMoneda.SelectedValue.ToEntero = 1, PUInv, PUInv * TipoCambioGuardar) - If(DdlMoneda.SelectedValue.ToEntero = 1, tDescuento, tDescuento * TipoCambioGuardar)
|
ImporteConcepto = If(DdlMoneda.SelectedValue.ToEntero = 1, PUInv, PUInv * TipoCambioGuardar) - If(DdlMoneda.SelectedValue.ToEntero = 1, tDescuento, tDescuento * TipoCambioGuardar)
|
||||||
|
'si no es por serie lote
|
||||||
ImporteConcepto = If(UsuarioActual.Empresa.UsaAC, ImporteConcepto * IVA, ImporteConcepto)
|
ImporteConcepto = If(UsuarioActual.Empresa.UsaAC, ImporteConcepto * IVA, ImporteConcepto)
|
||||||
If Dr("CveAlmacen").ToString.ToEntero = tCveAlmacen Then
|
If Dr("CveAlmacen").ToString.ToEntero = tCveAlmacen Then
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, CantidadInv, CveUnidad, Dr("CvePS").ToString.ToEntero, ImporteConcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, Dr("PU").ToString.ToDecimal), CostoIndirecto:=CostoIndirecto, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, CantidadInv, CveUnidad, Dr("CvePS").ToString.ToEntero, ImporteConcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, Dr("PU").ToString.ToDecimal), CostoIndirecto:=CostoIndirecto, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
i = i + 1
|
||||||
i = i + 1
|
contadorAlamcen = contadorAlamcen + 1
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -10988,7 +11013,16 @@ Partial Class Compras_Compras
|
|||||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
e.Row.FCDropDownList("ddlEAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(If(DdlTipoCompra.SelectedValue.ToEntero = 9, "CveTipoAlmacen IN (21)", "CveTipoAlmacen IN (1,2,7,14,19)")) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
|
||||||
|
If EsDevolucionApoyoLogistico Then
|
||||||
|
e.Row.FCDropDownList("ddlEAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen = 27") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
Else
|
||||||
|
e.Row.FCDropDownList("ddlEAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(If(DdlTipoCompra.SelectedValue.ToEntero = 9, "CveTipoAlmacen IN (21)", "CveTipoAlmacen IN (1,2,7,14,19)")) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
e.Row.FCDropDownList("ddlEAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
e.Row.FCDropDownList("ddlEAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
e.Row.FCDropDownList("ddlEAlmacen").DataBind()
|
e.Row.FCDropDownList("ddlEAlmacen").DataBind()
|
||||||
'e.Row.FCDropDownList("ddlEAlmacen").SelectedValue = If(e.Row.DBCampo("CveAlmacen").ToEntero <= 0, "-1", e.Row.DBCampo("CveAlmacen"))
|
'e.Row.FCDropDownList("ddlEAlmacen").SelectedValue = If(e.Row.DBCampo("CveAlmacen").ToEntero <= 0, "-1", e.Row.DBCampo("CveAlmacen"))
|
||||||
@@ -11100,6 +11134,10 @@ Partial Class Compras_Compras
|
|||||||
StrAlmacenes = $"Modalidad = 0"
|
StrAlmacenes = $"Modalidad = 0"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If EsDevolucionApoyoLogistico Then
|
||||||
|
StrAlmacenes = " CveTipoAlmacen = 27"
|
||||||
|
End If
|
||||||
|
|
||||||
e.Row.FCDropDownList("ddlAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(StrAlmacenes) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
e.Row.FCDropDownList("ddlAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(StrAlmacenes) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||||
e.Row.FCDropDownList("ddlAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
e.Row.FCDropDownList("ddlAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
e.Row.FCDropDownList("ddlAlmacen").DataBind()
|
e.Row.FCDropDownList("ddlAlmacen").DataBind()
|
||||||
@@ -17625,6 +17663,8 @@ Partial Class Compras_Compras
|
|||||||
'If GlobalDTProductosServiciosEquivalencias(CvePS, CveUM).Rows.Count = 0 Then Row("CveEq") = 1 Else Row("CveEq") = 0
|
'If GlobalDTProductosServiciosEquivalencias(CvePS, CveUM).Rows.Count = 0 Then Row("CveEq") = 1 Else Row("CveEq") = 0
|
||||||
Row("NoDeducible") = NoDeducible
|
Row("NoDeducible") = NoDeducible
|
||||||
|
|
||||||
|
|
||||||
|
Total = Math.Round(PU, DecimalesPermitidos) * Cantidad - Descuento
|
||||||
Row("PU") = Math.Round(PU, DecimalesPermitidos)
|
Row("PU") = Math.Round(PU, DecimalesPermitidos)
|
||||||
If CargaXml And (Version = "3.3" Or Version = "4.0") Then
|
If CargaXml And (Version = "3.3" Or Version = "4.0") Then
|
||||||
|
|
||||||
|
|||||||
@@ -2042,7 +2042,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
If Not ErrorAC And Not ErrorMovInv Then
|
If Not ErrorAC And Not ErrorMovInv Then
|
||||||
|
|
||||||
|
|
||||||
If Not DdlDireccionEnvio.SelectedValue.ToEntero > 0 Then
|
If ChkEmitirTimbrado.Checked AndAlso Not DdlDireccionEnvio.SelectedValue.ToEntero > 0 Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Alert("La direccion destino es requerida.", TipoMensaje.MsgAdvertencia)
|
Alert("La direccion destino es requerida.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1180,24 +1180,10 @@
|
|||||||
function InitCalendar() {
|
function InitCalendar() {
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
//$("#TxtModalFechaOS").on("change paste keyup", function () {
|
|
||||||
// console.log('TxtModalFechaOS Modificado');
|
|
||||||
//});
|
|
||||||
|
|
||||||
//jQuery('#TxtModalFechaOS').on('input', function () {
|
|
||||||
// console.log('TxtModalFechaOS Modificado');
|
|
||||||
//});
|
|
||||||
|
|
||||||
//$("#TxtModalFechaOS").change(function () {
|
|
||||||
// console.log('TxtModalFechaOS Modificado');
|
|
||||||
//});
|
|
||||||
|
|
||||||
Calendario();
|
Calendario();
|
||||||
|
|
||||||
// CargaPickers();
|
|
||||||
|
|
||||||
|
|
||||||
// $("#TxtModalFechaOS").val("" + start.format("DD/MM/YYYY 08:00 tt"));
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1358,11 +1358,6 @@ Partial Class OS_RepServicioDomicilio
|
|||||||
If DdlTecnicoAsignar.SelectedValue.ToEntero > 0 Then
|
If DdlTecnicoAsignar.SelectedValue.ToEntero > 0 Then
|
||||||
|
|
||||||
|
|
||||||
'If ViewState("Validando") Is Nothing Then
|
|
||||||
' ViewState("Validando") = True
|
|
||||||
'Else
|
|
||||||
' Exit Sub
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
Dim objOS As New ClsOS
|
Dim objOS As New ClsOS
|
||||||
|
|||||||
@@ -50,7 +50,8 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<asp:GridView ID="GvDocumentos" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvDocumentos" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="CveDocumentacion,Documentacion,DocumentacionFormato,Orden,Estatus,CveDocumentacionTipo,DocumentacionTipo,Requerido,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento" EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None">
|
DataKeyNames="CveDocumentacion,Documentacion,DocumentacionFormato,Orden,Estatus,CveDocumentacionTipo,DocumentacionTipo,Requerido,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento"
|
||||||
|
EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None" >
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="60px" HeaderText="Documento">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="60px" HeaderText="Documento">
|
||||||
@@ -111,7 +112,8 @@
|
|||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>
|
<asp:LinkButton ID="ImgDownLoadFormato" CssClass="btn btn-circle btn-sm blue" OnClick="DownLoadFormato_ClickDocumentacion" runat="server" Visible="false"
|
||||||
|
Text="<i class='fa fa-download' style='color:white' title='Descargar formato'></i>" CausesValidation="False" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|||||||
@@ -418,8 +418,11 @@ Partial Class RH_CatDocumentos
|
|||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString.ToEntero
|
Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString.ToEntero
|
||||||
Dim DocumetacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString
|
Dim DocumetacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString
|
||||||
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
|
|
||||||
|
'Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
|
||||||
|
Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato")
|
||||||
|
|
||||||
Dim separado As Char() = {"."}
|
Dim separado As Char() = {"."}
|
||||||
Dim array() As String = DocumetacionFormato.Split(separado)
|
Dim array() As String = DocumetacionFormato.Split(separado)
|
||||||
Dim extencion As String = ""
|
Dim extencion As String = ""
|
||||||
@@ -430,27 +433,50 @@ Partial Class RH_CatDocumentos
|
|||||||
|
|
||||||
If DocumetacionFormato.Trim.Length > 0 Then
|
If DocumetacionFormato.Trim.Length > 0 Then
|
||||||
|
|
||||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & _CveDocumentacion & "_" & DocumetacionFormato
|
Dim PathDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato
|
||||||
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato
|
Dim FileD = New FileInfo(PathDescargaArchivo)
|
||||||
If File.Exists(linkDescargaArchivo) Then
|
|
||||||
ImgDownLoad.Visible = True
|
|
||||||
If extencion.Length > 0 Then
|
|
||||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar Formato'></i></a>", linkDescarga, DocumetacionFormato)
|
|
||||||
Else
|
|
||||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar Formato'></i></a>", linkDescarga, DocumetacionFormato)
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
ImgDownLoad.Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
ImgDownLoad.Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
If FileD.Exists Then
|
||||||
|
ImgDownLoadFormato.Visible = True
|
||||||
|
ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoadFormato)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub DownLoadFormato_ClickDocumentacion(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
'Dim Adjunto As String = GvRow.DataKey("Adjunto")
|
||||||
|
|
||||||
|
Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString.ToEntero
|
||||||
|
Dim DocumetacionFormato As String = GvRow.DataKey("DocumentacionFormato").ToString
|
||||||
|
|
||||||
|
Dim PathDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato
|
||||||
|
|
||||||
|
Dim FileD = New FileInfo(PathDescargaArchivo)
|
||||||
|
|
||||||
|
If FileD.Exists Then
|
||||||
|
|
||||||
|
Response.Clear()
|
||||||
|
Response.AddHeader("Content-Disposition", "attachment; filename=" + FileD.Name)
|
||||||
|
Response.AddHeader("Content-Length", FileD.Length.ToString())
|
||||||
|
Response.ContentType = "text/octet-stream"
|
||||||
|
Response.Flush()
|
||||||
|
Response.TransmitFile(FileD.FullName)
|
||||||
|
Response.End()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
@@ -670,5 +696,7 @@ Partial Class RH_CatDocumentos
|
|||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DVParametros"))
|
RegistraScript(String.Format("$('#{0}').modal('show');", "DVParametros"))
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,19 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr align="left">
|
||||||
|
<td class="text-right"><b>Cuenta:</b></td>
|
||||||
|
<td>
|
||||||
|
<asp:Textbox runat="server" ID="TxtCuenta" Width="200px" MaxLength="50"/>
|
||||||
|
</td>
|
||||||
|
<td class="text-right"><b></b></td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center;" colspan="4">
|
<td style="text-align: center;" colspan="4">
|
||||||
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" class="btn btn-primary" /></td>
|
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" class="btn btn-primary" /></td>
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Owin.Security.Provider
|
||||||
|
|
||||||
Partial Class PopUpBuscarClientes
|
Partial Class PopUpBuscarClientes
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
@@ -74,13 +76,17 @@ Partial Class PopUpBuscarClientes
|
|||||||
Dim ObjClientes As New ClsClientes()
|
Dim ObjClientes As New ClsClientes()
|
||||||
Dim CveUsuarioConsulta As Integer
|
Dim CveUsuarioConsulta As Integer
|
||||||
|
|
||||||
|
|
||||||
|
Dim Cuenta As String = If(TxtCuenta.Text = "", "-1", TxtCuenta.Text)
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(322) Then
|
If UsuarioActual.TienePermisoProceso(322) Then
|
||||||
CveUsuarioConsulta = UsuarioActual.CveVendedor
|
CveUsuarioConsulta = UsuarioActual.CveVendedor
|
||||||
Else
|
Else
|
||||||
CveUsuarioConsulta = -1
|
CveUsuarioConsulta = -1
|
||||||
End If
|
End If
|
||||||
If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
|
If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
|
||||||
DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente, TopSelect:=100, CveUsuarioConsulta:=CveUsuarioConsulta) Then
|
DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente, TopSelect:=100, CveUsuarioConsulta:=CveUsuarioConsulta, Cuenta:=Cuenta) Then
|
||||||
|
|
||||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||||
LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
||||||
GV.DataSource = ObjClientes.DtResultados
|
GV.DataSource = ObjClientes.DtResultados
|
||||||
@@ -150,6 +156,7 @@ Partial Class PopUpBuscarClientes
|
|||||||
If TxtMail.Text.Trim <> String.Empty Then Return True
|
If TxtMail.Text.Trim <> String.Empty Then Return True
|
||||||
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True
|
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True
|
||||||
If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True
|
If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True
|
||||||
|
If TxtCuenta.Text.Trim.Length > 0 Then Return True
|
||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user