--activar carga de documento en Roles
This commit is contained in:
@@ -329,6 +329,26 @@ Public Class ClsSisRoles
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdateRolAdjunto(CveRol As Integer, Adjunto As String, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Sis_RolAdjuntoUpdate")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveRol", SqlDbType.Int).Value = CveRol
|
||||||
|
.Add("@Adjunto", SqlDbType.VarChar).Value = Adjunto
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar el adjunto del rol.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
' IDisposable
|
' IDisposable
|
||||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||||
If Not Me.disposedValue Then
|
If Not Me.disposedValue Then
|
||||||
|
|||||||
@@ -6,13 +6,15 @@
|
|||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.fa-file-pdf-o{
|
.fa-file-pdf-o {
|
||||||
color: #e43a45;
|
color: #e43a45;
|
||||||
}
|
}
|
||||||
.fa-file-word-o{
|
|
||||||
color: #337ab7;
|
.fa-file-word-o {
|
||||||
}
|
color: #337ab7;
|
||||||
.fa-3 {
|
}
|
||||||
|
|
||||||
|
.fa-3 {
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,6 +91,48 @@
|
|||||||
</div>--%>
|
</div>--%>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<%-- Mi Perfil --%>
|
||||||
|
<div class="mt-list-container list-todo" id="DivPerfil" runat="server" visible="false">
|
||||||
|
<div class="list-todo-line"></div>
|
||||||
|
<ul>
|
||||||
|
<li class="mt-list-item">
|
||||||
|
<div class="list-todo-icon bg-white">
|
||||||
|
<i class="fa fa-user"></i>
|
||||||
|
</div>
|
||||||
|
<div class="list-todo-item grey">
|
||||||
|
<a class="list-toggle-container font-white" data-toggle="collapse" href="#taskRoles" aria-expanded="false">
|
||||||
|
<div class="list-toggle done uppercase">
|
||||||
|
<div class="list-toggle-title bold">Mi Perfil</div>
|
||||||
|
<div class="badge badge-default pull-right bold">1</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<div class="task-list panel-collapse collapse " id="taskRoles">
|
||||||
|
<ul>
|
||||||
|
<li class="task-list-item done">
|
||||||
|
<div class="task-icon">
|
||||||
|
<a href="javascript:;">
|
||||||
|
<i class="fa fa-file-pdf-o fa-3"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<asp:UpdatePanel ID="UpAdjunto" runat="server" UpdateMode="Conditional" class="task-status">
|
||||||
|
<ContentTemplate>
|
||||||
|
<a class="done" id="linkDescargaRol" runat="server">
|
||||||
|
<i class="fa fa-download fa-3"></i>
|
||||||
|
</a>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<div class="task-content">
|
||||||
|
<h4 class="uppercase bold">Manual del Rol
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<%-- Ordenes de compra --%>
|
<%-- Ordenes de compra --%>
|
||||||
<div class="mt-list-container list-todo">
|
<div class="mt-list-container list-todo">
|
||||||
<div class="list-todo-line"></div>
|
<div class="list-todo-line"></div>
|
||||||
@@ -268,7 +312,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="task-content">
|
<div class="task-content">
|
||||||
<h4 class="uppercase bold">Cancelacion de complementos de pago
|
<h4 class="uppercase bold">Cancelacion de complementos de pago
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -285,7 +329,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="task-content">
|
<div class="task-content">
|
||||||
<h4 class="uppercase bold">Manual Cuentas Bancarias
|
<h4 class="uppercase bold">Manual Cuentas Bancarias
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -302,7 +346,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="task-content">
|
<div class="task-content">
|
||||||
<h4 class="uppercase bold">Procedimiento de caja chica
|
<h4 class="uppercase bold">Procedimiento de caja chica
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -319,7 +363,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="task-content">
|
<div class="task-content">
|
||||||
<h4 class="uppercase bold">Procedimiento para actualizar gestor de cobranza
|
<h4 class="uppercase bold">Procedimiento para actualizar gestor de cobranza
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -336,7 +380,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="task-content">
|
<div class="task-content">
|
||||||
<h4 class="uppercase bold">Surtir mercancía de contado
|
<h4 class="uppercase bold">Surtir mercancía de contado
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -353,7 +397,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="task-content">
|
<div class="task-content">
|
||||||
<h4 class="uppercase bold">Uso de cajas chicas y Cortes en Punto de Venta
|
<h4 class="uppercase bold">Uso de cajas chicas y Cortes en Punto de Venta
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -417,7 +461,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="task-content">
|
<div class="task-content">
|
||||||
<h4 class="uppercase bold">Procesos de Ventas
|
<h4 class="uppercase bold">Procesos de Ventas
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -434,7 +478,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="task-content">
|
<div class="task-content">
|
||||||
<h4 class="uppercase bold">Reportes de Ventas
|
<h4 class="uppercase bold">Reportes de Ventas
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -475,7 +519,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="task-content">
|
<div class="task-content">
|
||||||
<h4 class="uppercase bold">Manual RH
|
<h4 class="uppercase bold">Manual RH
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -492,7 +536,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="task-content">
|
<div class="task-content">
|
||||||
<h4 class="uppercase bold">Registro y asignación de uniformes
|
<h4 class="uppercase bold">Registro y asignación de uniformes
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -509,7 +553,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="task-content">
|
<div class="task-content">
|
||||||
<h4 class="uppercase bold">Solicitud de permisos
|
<h4 class="uppercase bold">Solicitud de permisos
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -526,7 +570,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="task-content">
|
<div class="task-content">
|
||||||
<h4 class="uppercase bold">Viaticos
|
<h4 class="uppercase bold">Viaticos
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -568,7 +612,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="task-content">
|
<div class="task-content">
|
||||||
<h4 class="uppercase bold">Manual Activo Fijo
|
<h4 class="uppercase bold">Manual Activo Fijo
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -609,7 +653,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="task-content">
|
<div class="task-content">
|
||||||
<h4 class="uppercase bold">Manual recepcion de Almacen
|
<h4 class="uppercase bold">Manual recepcion de Almacen
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -636,7 +680,7 @@
|
|||||||
<div class="badge badge-default pull-right bold">1</div>
|
<div class="badge badge-default pull-right bold">1</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="task-list panel-collapse collapse " id="divtaskOI" runat="server" ClientIDMode="Static">
|
<div class="task-list panel-collapse collapse " id="divtaskOI" runat="server" clientidmode="Static">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="task-list-item done">
|
<li class="task-list-item done">
|
||||||
<div class="task-icon">
|
<div class="task-icon">
|
||||||
@@ -651,11 +695,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="task-content">
|
<div class="task-content">
|
||||||
<h4 class="uppercase bold">Manual OI
|
<h4 class="uppercase bold">Manual OI
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,12 +6,37 @@ Imports Extensiones
|
|||||||
Partial Class Metronic_SigAyuda
|
Partial Class Metronic_SigAyuda
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Public Property Adjunto As String
|
||||||
|
Get
|
||||||
|
Adjunto = ViewState("Adjunto").ToString
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("Adjunto") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Sub Metronic_SigAyuda_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub Metronic_SigAyuda_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
If usuarioActual.CveEmpresa.Contiene(13, 83) Then
|
Me.Adjunto = ""
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||||
divtaskOI.Visible = True
|
divtaskOI.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" OrElse UsuarioActual.CveRol = 1 Then
|
||||||
|
Dim ObjRoles As New ClsSisRoles
|
||||||
|
If ObjRoles.GetRoles(UsuarioActual.CveRol, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjRoles.DtResultados IsNot Nothing AndAlso ObjRoles.DtResultados.Rows.Count = 1 Then
|
||||||
|
Me.Adjunto = ObjRoles.DtResultados.Rows(0)("Adjunto").ToString()
|
||||||
|
If Not String.IsNullOrEmpty(Me.Adjunto) Then
|
||||||
|
linkDescargaRol.HRef = $"javascript:downFile('{Me.Adjunto}');"
|
||||||
|
DivPerfil.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjRoles.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
UpAdjunto.Update()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub btnDownload_Click(sender As Object, e As EventArgs)
|
Protected Sub btnDownload_Click(sender As Object, e As EventArgs)
|
||||||
|
|||||||
@@ -51,6 +51,19 @@
|
|||||||
<%-- <ajax:ValidatorCalloutExtender ID="VCEEmpresa" runat="server" HighlightCssClass="vco" TargetControlID="RFVRol" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
<%-- <ajax:ValidatorCalloutExtender ID="VCEEmpresa" runat="server" HighlightCssClass="vco" TargetControlID="RFVRol" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||||
<label for="<%= TxtRol.ClientID.ToString()%>">Nombre Rol:</label>
|
<label for="<%= TxtRol.ClientID.ToString()%>">Nombre Rol:</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row" id="DivManual" runat="server" visible="false">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Manual del rol:</label>
|
||||||
|
<div>
|
||||||
|
<asp:LinkButton ID="BtnAdjuntar" runat="server" Visible="false" Text="<i class='fa-upload fa' style=' color: white;'></i> Adjuntar" data-toggle="modal" data-target="#ModalAdjuntar" CssClass="btn myventasbutton btn-primary" />
|
||||||
|
<br />
|
||||||
|
<asp:LinkButton ID="BtnArchivoAdjunto" runat="server" Visible="false" Text="" Font-Size="14px" />
|
||||||
|
|
||||||
|
<asp:LinkButton ID="BtnReemplazarAdjunto" runat="server" Visible="false" AlternateText="Reemplazar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-sm blue" Text="<i class='fa-upload fa' style=' color: white;'></i>" data-toggle="modal" data-target="#ModalAdjuntar" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright" id="LblFechaAlta" runat="server">
|
<div class="form-group form-md-line-input input-iconright" id="LblFechaAlta" runat="server">
|
||||||
<label for="<%= TxtFecha.ClientID.ToString()%>">Fecha Alta:</label>
|
<label for="<%= TxtFecha.ClientID.ToString()%>">Fecha Alta:</label>
|
||||||
<asp:Label ID="TxtFecha" runat="server"></asp:Label>
|
<asp:Label ID="TxtFecha" runat="server"></asp:Label>
|
||||||
@@ -59,6 +72,7 @@
|
|||||||
<label for="<%= TxtUsuarioAlta.ClientID.ToString()%>">Usuario Alta:</label>
|
<label for="<%= TxtUsuarioAlta.ClientID.ToString()%>">Usuario Alta:</label>
|
||||||
<asp:Label ID="TxtUsuarioAlta" runat="server"></asp:Label>
|
<asp:Label ID="TxtUsuarioAlta" runat="server"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,15 +83,15 @@
|
|||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabPanelPermisos" runat="server" HeaderText="Acceso a Módulos">
|
<ajax:TabPanel ID="TabPanelPermisos" runat="server" HeaderText="Acceso a Módulos">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:UpdatePanel ID="UPPAltaRep" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPAltaRep" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="row" align="right">
|
<div class="row" align="right">
|
||||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvPermisos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvPermisos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvPermisos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvPermisos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@@ -122,37 +136,37 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
|
|
||||||
<div class="row" align="right">
|
<div class="row" align="right">
|
||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvProcesos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvProcesos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvProcesos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvProcesos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<asp:GridView ID="GvProcesos" runat="server" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" AutoGenerateColumns="False" Width="100%" DataKeyNames="CveRol,CveModulo,CveProceso" GridLines="None">
|
<asp:GridView ID="GvProcesos" runat="server" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" AutoGenerateColumns="False" Width="100%" DataKeyNames="CveRol,CveModulo,CveProceso" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Modulo" HeaderText="Módulo">
|
<asp:BoundField DataField="Modulo" HeaderText="Módulo">
|
||||||
<ControlStyle Width="150px" />
|
<ControlStyle Width="150px" />
|
||||||
<ItemStyle HorizontalAlign="Left" />
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
</asp:BoundField>
|
</asp:BoundField>
|
||||||
<asp:BoundField DataField="Descripcion" HeaderText="Proceso">
|
<asp:BoundField DataField="Descripcion" HeaderText="Proceso">
|
||||||
<ControlStyle Width="250px" />
|
<ControlStyle Width="250px" />
|
||||||
<ItemStyle HorizontalAlign="Left" />
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
</asp:BoundField>
|
</asp:BoundField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate><span title="Permitir">P</span></HeaderTemplate>
|
<HeaderTemplate><span title="Permitir">P</span></HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox runat="server" ID="ChkP"></asp:CheckBox>
|
<asp:CheckBox runat="server" ID="ChkP"></asp:CheckBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ControlStyle Width="25px" />
|
<ControlStyle Width="25px" />
|
||||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
<HeaderStyle CssClass="Titulos" Height="15px"></HeaderStyle>
|
<HeaderStyle CssClass="Titulos" Height="15px"></HeaderStyle>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -161,7 +175,7 @@
|
|||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabPanelIndicadores" runat="server" HeaderText="Indicadores">
|
<ajax:TabPanel ID="TabPanelIndicadores" runat="server" HeaderText="Indicadores">
|
||||||
@@ -187,7 +201,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
@@ -213,7 +227,7 @@
|
|||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabPanelUsuarios" runat="server" HeaderText="Usuarios">
|
<ajax:TabPanel ID="TabPanelUsuarios" runat="server" HeaderText="Usuarios">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:UpdatePanel ID="UpUsuarios" UpdateMode="Conditional" runat="server">
|
<asp:UpdatePanel ID="UpUsuarios" UpdateMode="Conditional" runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -235,19 +249,18 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<asp:GridView ID="GvUsurios" DataKeyNames="CveUsuario" data-sort="true" CssClass="table table-striped table-hover Widthall ScrollAD"
|
<asp:GridView ID="GvUsurios" DataKeyNames="CveUsuario" data-sort="true" CssClass="table table-striped table-hover Widthall ScrollAD"
|
||||||
DataKey="CveUsuario" AutoGenerateColumns="false" GridLines="None" EmptyDataText="Aun no se usuarios" runat="server">
|
DataKey="CveUsuario" AutoGenerateColumns="false" GridLines="None" EmptyDataText="Aun no se usuarios" runat="server">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" />
|
<asp:BoundField DataField="Usuario" HeaderText="Usuario" />
|
||||||
<asp:BoundField DataField="Nombre" HeaderText="Nombre" />
|
<asp:BoundField DataField="Nombre" HeaderText="Nombre" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
@@ -275,6 +288,29 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<%--MODAL ADJUNTAR--%>
|
||||||
|
<div id="ModalAdjuntar" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Adjuntar</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:TextBox ID="txtAdjuntar" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="btnGuardarAdjunto" runat="server" Text="Guardar" CssClass="btn btn-primary" OnClick="btnGuardarAdjunto_Click" />
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Drawing
|
Imports System.Drawing
|
||||||
|
Imports DocumentFormat.OpenXml.Drawing.Diagrams
|
||||||
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Partial Class Sistemas_RolesDetalle
|
Partial Class Sistemas_RolesDetalle
|
||||||
@@ -43,6 +45,11 @@ Partial Class Sistemas_RolesDetalle
|
|||||||
TxtFecha.Text = DTRoles.FiltroPrimeroValor("FechaIng").ToDate.ToShortDateString
|
TxtFecha.Text = DTRoles.FiltroPrimeroValor("FechaIng").ToDate.ToShortDateString
|
||||||
TxtUsuarioAlta.Text = DTRoles.FiltroPrimeroValor("Nombre")
|
TxtUsuarioAlta.Text = DTRoles.FiltroPrimeroValor("Nombre")
|
||||||
DdlModulo.SelectedValueExist(DTRoles.FiltroPrimeroValor("CveModulo").ToEntero)
|
DdlModulo.SelectedValueExist(DTRoles.FiltroPrimeroValor("CveModulo").ToEntero)
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" OrElse UsuarioActual.CveRol = 1 Then
|
||||||
|
CargaAdjunto(DTRoles.FiltroPrimeroValor("Adjunto"))
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Dim Liga As String = $"document.location.href=""/Sistemas/CatRoles.aspx"";"
|
Dim Liga As String = $"document.location.href=""/Sistemas/CatRoles.aspx"";"
|
||||||
Alert("El Rol solicitado no existe.", TipoMensaje.MsgAdvertencia, Liga)
|
Alert("El Rol solicitado no existe.", TipoMensaje.MsgAdvertencia, Liga)
|
||||||
@@ -59,6 +66,18 @@ Partial Class Sistemas_RolesDetalle
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaAdjunto(Adjunto As String)
|
||||||
|
DivManual.Visible = True
|
||||||
|
If Adjunto <> "" Then
|
||||||
|
BtnArchivoAdjunto.Text = Adjunto
|
||||||
|
BtnArchivoAdjunto.Visible = True
|
||||||
|
BtnAdjuntar.Visible = False
|
||||||
|
BtnReemplazarAdjunto.Visible = True
|
||||||
|
Else
|
||||||
|
BtnAdjuntar.Visible = True
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaUsuarios()
|
Private Sub CargaUsuarios()
|
||||||
|
|
||||||
If CveRol > 0 Then
|
If CveRol > 0 Then
|
||||||
@@ -253,5 +272,57 @@ Partial Class Sistemas_RolesDetalle
|
|||||||
GlobalDTRoles(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTRoles(UsuarioActual.CveEmpresa) = Nothing
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GuardarArchivoAdjunto()
|
||||||
|
If Not txtAdjuntar.getfiles().Archivos.Count > 0 Then
|
||||||
|
Alert("Tiene que cargar un archivo.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim FileExtension As String = "-1"
|
||||||
|
Dim Filesgral As List(Of Archivo) = txtAdjuntar.getfiles().Archivos
|
||||||
|
Dim Filename As String = ""
|
||||||
|
Dim fileItem As Archivo = Filesgral(0)
|
||||||
|
Try
|
||||||
|
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||||
|
Dim Adjunto = String.Format("{0}.{1}", Me.CveRol, FileExtension)
|
||||||
|
|
||||||
|
Dim Path As String
|
||||||
|
Path = String.Format("{0}Roles", UsuarioActual.Empresa.Ruta)
|
||||||
|
If Not Directory.Exists(Path) Then
|
||||||
|
Directory.CreateDirectory(Path)
|
||||||
|
End If
|
||||||
|
Path += $"/{Adjunto}"
|
||||||
|
If File.Exists(Path) Then
|
||||||
|
File.Delete(Path)
|
||||||
|
End If
|
||||||
|
My.Computer.FileSystem.MoveFile(fileItem.FileUrl, Path)
|
||||||
|
|
||||||
|
If File.Exists(Path) Then
|
||||||
|
If Me.CveRol > 0 Then
|
||||||
|
Using ObjRol As New ClsSisRoles
|
||||||
|
If ObjRol.UpdateRolAdjunto(Me.CveRol, Adjunto, UsuarioActual.CveEmpresa) Then
|
||||||
|
Alert("Documento cargado", TipoMensaje.MsgInformacion)
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
Else
|
||||||
|
Alert("Documento cargado", TipoMensaje.MsgInformacion)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
BtnAdjuntar.Visible = False
|
||||||
|
BtnArchivoAdjunto.Text = Adjunto
|
||||||
|
BtnArchivoAdjunto.Visible = True
|
||||||
|
BtnReemplazarAdjunto.Visible = True
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Error al cargar archivo", ex)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub btnGuardarAdjunto_Click(sender As Object, e As EventArgs)
|
||||||
|
GuardarArchivoAdjunto()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user