Ajustes Documentos
This commit is contained in:
@@ -1646,12 +1646,14 @@ Public Class ClsCompProveedores
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetTiposContratosDcumentos(CveEmpresa As Integer) As Boolean
|
||||
Public Function GetTiposContratosDcumentos(CveEmpresa As Integer, Optional CveDocumentacion As Integer = -1, Optional CveTipoContrato As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Prov_SAT_CatTipoContratosDocumentosGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveDocumentacion", SqlDbType.Int).Value = CveDocumentacion
|
||||
.Add("@CveTipoContrato", SqlDbType.Int).Value = CveTipoContrato
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
@@ -1756,7 +1758,7 @@ Public Class ClsCompProveedores
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetContrato(CveContrato As Integer, CveSubProyecto As Integer, CveProveedor As Integer, CveTipoContrato As Integer, CveRepresentanteLegal As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetContrato(CveContrato As Integer, CveSubProyecto As Integer, CveProveedor As Integer, CveTipoContrato As Integer, CveRepresentanteLegal As Integer, Estatus As Integer, CveEmpresa As Integer, FechaI As Date, FechaF As Date) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1771,6 +1773,10 @@ Public Class ClsCompProveedores
|
||||
.Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
|
||||
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -2056,7 +2056,7 @@ Namespace Extensiones
|
||||
End Sub
|
||||
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Sub ExportToExcelGembox(GridView As GridView, NombreArchivoXLSx As String, Usuario As Usuario, FechaIMes As String, FechaFMes As String, Titulo As String, SubProyecto As String, Divisor As Integer, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional DatoTituloExtra As String ="")
|
||||
Public Sub ExportToExcelGembox(GridView As GridView, NombreArchivoXLSx As String, Usuario As Usuario, FechaIMes As String, FechaFMes As String, Titulo As String, SubProyecto As String, Divisor As Integer, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional DatoTituloExtra As String = "")
|
||||
|
||||
Dim sw1 As New StringWriter()
|
||||
Dim htw1 As New HtmlTextWriter(sw1)
|
||||
@@ -2113,13 +2113,16 @@ Namespace Extensiones
|
||||
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
Dim RangoFechas = worksheet.Cells.GetSubrangeAbsolute(4, celdasConTexto.FirstColumnIndex, 4, celdasConTexto.LastColumnIndex)
|
||||
RangoFechas.Merged = True
|
||||
RangoFechas.Value = $"Fechas: {FechaIMes} a {FechaFMes}"
|
||||
RangoFechas.Style.Font.Size = 15 * 20
|
||||
RangoFechas.Style.Font.Name = "Calibri Light"
|
||||
RangoFechas.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoFechas.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
If FechaIMes.Trim.Length > 0 And FechaFMes.Trim.Length > 0 Then
|
||||
Dim RangoFechas = worksheet.Cells.GetSubrangeAbsolute(4, celdasConTexto.FirstColumnIndex, 4, celdasConTexto.LastColumnIndex)
|
||||
RangoFechas.Merged = True
|
||||
RangoFechas.Value = $"Fechas: {FechaIMes} a {FechaFMes}"
|
||||
RangoFechas.Style.Font.Size = 15 * 20
|
||||
RangoFechas.Style.Font.Name = "Calibri Light"
|
||||
RangoFechas.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoFechas.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
End If
|
||||
|
||||
|
||||
If SubProyecto.Length > 0 Then
|
||||
|
||||
@@ -784,7 +784,7 @@
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<%--<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>--%>
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);" Visible="false"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:HyperLink ID="HLNombre" runat="server" Text='<%# Eval("Nombre")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
|
||||
@@ -20,10 +20,70 @@
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||
|
||||
<div class="tools">
|
||||
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" OnClick="btConsultar_Click" /></td>
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption magindate">
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-1 ">Documento:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlDocumentacion" runat="server" CssClass="select2me" Width="100%" DataTextField="Documentacion" DataValueField="CveDocumentacion" >
|
||||
</asp:DropDownList >
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 ">Tipo Contrato:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlTipoContratoFiltro" runat="server" CssClass="select2me" Width="100%" DataTextField="TipoContrato" DataValueField="CveTipoContrato">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="portlet-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 ">Estatus:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100%" >
|
||||
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
<asp:ListItem Value="1" >Vigente</asp:ListItem>
|
||||
<asp:ListItem Value="2" >Rescindido</asp:ListItem>
|
||||
<asp:ListItem Value="3" >Suspendido</asp:ListItem>
|
||||
<asp:ListItem Value="4" >Terminado</asp:ListItem>
|
||||
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<%-- <asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
@@ -11,17 +11,53 @@ Partial Class Edoc_CatDocumentosContratos
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDropDownList()
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDropDownList()
|
||||
|
||||
|
||||
|
||||
Dim ObjProveedor As New ClsCompProveedores
|
||||
|
||||
|
||||
If ObjProveedor.GetTiposContratos(-1, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlTipoContratoFiltro.DataSource = ObjProveedor.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjProveedor.Dispose()
|
||||
|
||||
DdlTipoContratoFiltro.DataBind()
|
||||
DdlTipoContratoFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
Dim ObjEdoc As New ClsEdocumentacion
|
||||
|
||||
If ObjEdoc.DocumentacionGet(-1, -1, 1, UsuarioActual.CveEmpresa, 3) Then
|
||||
DdlDocumentacion.DataSource = ObjEdoc.DtResultados
|
||||
Else
|
||||
DdlDocumentacion.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjEdoc.Dispose()
|
||||
|
||||
DdlDocumentacion.DataBind()
|
||||
DdlDocumentacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
|
||||
If ObjProv.GetTiposContratosDcumentos(UsuarioActual.CveEmpresa) Then
|
||||
If ObjProv.GetTiposContratosDcumentos(UsuarioActual.CveEmpresa, DdlDocumentacion.SelectedValue.ToEntero, DdlTipoContratoFiltro.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjProv.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
@@ -30,7 +66,7 @@ Partial Class Edoc_CatDocumentosContratos
|
||||
ObjProv.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -49,4 +85,7 @@ Partial Class Edoc_CatDocumentosContratos
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub btConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -71,23 +71,47 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="portlet-body">
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 ">Estatus:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100%" >
|
||||
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
<asp:ListItem Value="1" >Vigente</asp:ListItem>
|
||||
<asp:ListItem Value="2" >Rescindido</asp:ListItem>
|
||||
<asp:ListItem Value="3" >Suspendido</asp:ListItem>
|
||||
<asp:ListItem Value="4" >Terminado</asp:ListItem>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-2" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-2" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -37,6 +37,9 @@ Partial Class Proveedores_Contratos
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
|
||||
txtFechaI.Text = $"01/01/{Now.Year}"
|
||||
txtFechaF.Text = $"31/12/{Now.AddYears(3).Year}"
|
||||
|
||||
|
||||
End If
|
||||
|
||||
@@ -47,7 +50,7 @@ Partial Class Proveedores_Contratos
|
||||
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
|
||||
If ObjProv.GetContrato(-1, DdlSubProyectoFiltro.SelectedValue.ToEntero, DdlProveedorFiltro.SelectedValue.ToEntero, DdlTipoContratoFiltro.SelectedValue.ToEntero, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProv.GetContrato(-1, DdlSubProyectoFiltro.SelectedValue.ToEntero, DdlProveedorFiltro.SelectedValue.ToEntero, DdlTipoContratoFiltro.SelectedValue.ToEntero, -1, -1, UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate) Then
|
||||
GvDatos.DataSource = ObjProv.DtResultados
|
||||
DtDatos = ObjProv.DtResultados
|
||||
Else
|
||||
|
||||
@@ -290,8 +290,9 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
RVFecha.MaximumValue = Now.ToShortDateString
|
||||
|
||||
If Not UsuarioActual.CveEmpresa = 41 Then
|
||||
If Not UsuarioActual.CveEmpresa = 48 Then
|
||||
TxtFecha.Enabled = False
|
||||
ImgFecha.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user