Merge branch 'master' of http://192.168.10.111:8383/SIG
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
|
||||||
|
|||||||
@@ -1799,6 +1799,21 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
|
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
|
||||||
Dim dtsubp As DataTable = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
|
Dim dtsubp As DataTable = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 189 Then
|
||||||
|
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
||||||
|
Dim SubTotal = Row("SubTotal").ToString().ToDecimal.RoundSQL
|
||||||
|
Dim IVA = Row("IVA").ToString().ToDecimal.RoundSQL
|
||||||
|
Dim Total = Row("Total").ToString().ToDecimal.RoundSQL
|
||||||
|
Dim Cantidad = Row("Cantidad").ToString.ToDecimal
|
||||||
|
Dim PU = Row("PU").ToString.ToDecimal
|
||||||
|
|
||||||
|
If Total - SubTotal - IVA <> 0 Then
|
||||||
|
Row("PU") = (Total - IVA) / Cantidad
|
||||||
|
Row("SubTotal") = Row("PU").ToString.ToDecimal * Cantidad
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
Dim CountRow As Integer = 1
|
Dim CountRow As Integer = 1
|
||||||
Dim LastSerieFolioTipoDoc As String = String.Empty
|
Dim LastSerieFolioTipoDoc As String = String.Empty
|
||||||
Dim EsDetalle As Boolean = False
|
Dim EsDetalle As Boolean = False
|
||||||
|
|||||||
@@ -9,9 +9,11 @@
|
|||||||
.fa-file-pdf-o {
|
.fa-file-pdf-o {
|
||||||
color: #e43a45;
|
color: #e43a45;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fa-file-word-o {
|
.fa-file-word-o {
|
||||||
color: #337ab7;
|
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>
|
||||||
@@ -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">
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -239,7 +253,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
@@ -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