Merge - Recepcion Usados
This commit is contained in:
@@ -44,7 +44,13 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
||||
|
||||
<ajax:TabPanel ID="TabAvance" runat="server" HeaderText="Avance">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
@@ -70,8 +76,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1" style="text-align:right!important">
|
||||
Fecha:
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
@@ -82,12 +95,21 @@
|
||||
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<a class="linkfile" id="btnanexogral" runat="server" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6" style="text-align:right">
|
||||
<a class="linkfile" id="btnanexogral" runat="server" >
|
||||
<span class="btn btn-circle btn-sm btn-success"><i class='fa fa-plus'></i></span>Agregar
|
||||
<asp:TextBox ID="AnexoGral" Text='' runat="server"></asp:TextBox>
|
||||
</a>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<table class="table table-striped Widthall">
|
||||
<tr>
|
||||
<th style="width: 300px;"></th>
|
||||
@@ -107,13 +129,18 @@
|
||||
<th style="text-align: right;">Anexo</th>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
||||
DataKeyNames="CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance"
|
||||
CssClass="table GVEstimacion table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' ></asp:LinkButton>
|
||||
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false" ></asp:LinkButton>
|
||||
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
@@ -148,27 +175,217 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText=" ">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" />
|
||||
<a class="btn btn-circle btn-sm btn-success hidden linkfile">
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm btn-success" ID="LnkModalDropzone" Visible="false"> <i class='fa fa-plus'></i></asp:LinkButton>
|
||||
<%-- <a class="btn btn-circle btn-sm btn-success hidden linkfile">
|
||||
<i class='fa fa-plus'></i><asp:TextBox ID="TXTAnexo" CssClass="hidden" runat="server"></asp:TextBox>
|
||||
</a>
|
||||
</a>--%>
|
||||
|
||||
|
||||
<div runat="server" id="ModalAnexoEvidencia" 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">Cargar Evidencia</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div style="text-align:left">
|
||||
<asp:TextBox ID="TXTAnexo" CssClass="ADSdropzone hidden" data-maxFile="10" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div class="text-center"><asp:Button id="BtnGuardar" CssClass="btn btn-primary" runat="server" Text="Guardar" Visible="false" /></div>
|
||||
<asp:GridView ID="GvAnexos" AutoGenerateColumns="false" runat="server" ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron archivos">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Archivo">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HPLArchivo" runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-center">
|
||||
<asp:Button id="BtnGuardar" CssClass="btn btn-primary" runat="server" Text="Guardar" Visible="false" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabEstimación" runat="server" HeaderText="Estimación">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpEstimaciones" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultarEstimaciones" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
|
||||
<div class="titlefiltros caption" style="position: relative;">
|
||||
<asp:UpdatePanel class="row" ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<label class="col-md-1 truncate">Contrato:</label>
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="ddls">
|
||||
<asp:DropDownList ID="DDlContratosEstimaciones" runat="server" AutoPostBack="true" DataTextField="ContratoCompleto" DataValueField="CveContrato" Class=" form-control input-inline select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvEstimaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
||||
DataKeyNames="CveContratoAvance,CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance"
|
||||
CssClass="table GVEstimacion table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false" ></asp:LinkButton>
|
||||
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Cantidad", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Importe", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Cantidad_Ultima", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Importe_Ultima", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" Text="" CssClass="txtcant" onkeyup="ValidateCant(this)" type="number" step="any" data-cantidad='<%# Eval("CantidadMax")%>' data-pu='<%# Eval("PU")%>' data-cve='<%# Eval("CveContratoDetalle") %>' Width="90" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" Text="" data-cve='<%# Eval("CveContratoDetalle") %>' CssClass="txtimporte" type="number" step="any" Width="90" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText=" ">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" />
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm btn-success" ID="LnkModalDropzone" Visible="false"> <i class='fa fa-plus'></i></asp:LinkButton>
|
||||
|
||||
|
||||
|
||||
<div runat="server" id="ModalAnexoEvidencia" 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">Cargar Evidencia</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div style="text-align:left">
|
||||
<asp:TextBox ID="TXTAnexo" CssClass="ADSdropzone hidden" data-maxFile="10" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="text-center">
|
||||
|
||||
<asp:Button id="BtnGuardarEstimacion" CssClass="btn btn-primary" runat="server" Text="Generar Estimacion" Visible="false"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="modal fade " id="dropmodal">
|
||||
@@ -178,7 +395,7 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Dropzone</span>
|
||||
<span class="caption-subject bold uppercase">Cargar Evidencia</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
@@ -193,25 +410,86 @@
|
||||
<div id="my-dropzone" class="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="text-align: center!important">
|
||||
<br />
|
||||
<button id="btnCerrarModal" runat="server" type="button" class="btn default" data-dismiss="modal">Cerrar</button>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="ModalAnexos" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<asp:UpdatePanel ID="UpModalAnexos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label runat="server" ID="LblTituloModalAnexo"></asp:Label></h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12" style="text-align:center!important">
|
||||
<asp:GridView ID="GvAnexos" AutoGenerateColumns="false" runat="server" ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron archivos" Width="100"
|
||||
DataKeyNames="Archivo" CssClass="table GVEstimacion table-advance table-hover" GridLines ="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Anexos">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:LinkButton ID="LnkArchivo" runat="server" OnClick="LnkArchivo_Click"></asp:LinkButton>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
||||
|
||||
<%--<script src="../Scripts/dropzone/dropzone.min.js"></script>--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" Runat="Server">
|
||||
|
||||
<script>
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
<script>
|
||||
|
||||
$(".linkfile").click(function () {
|
||||
showmodalFile($(this).find('input').attr('id'));
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
$(".linkfile").click(function () {
|
||||
showmodalFile($(this).find('input').attr('id'));
|
||||
});
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
$(".linkfile").click(function () {
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
$(".linkfile").click(function () {
|
||||
showmodalFile($(this).find('input').attr('id'));
|
||||
});
|
||||
});
|
||||
@@ -224,7 +502,8 @@
|
||||
ADDropzone(obj);
|
||||
$('#dropmodal').modal();
|
||||
}
|
||||
function ValidateCant(variable){
|
||||
function ValidateCant(variable) {
|
||||
|
||||
var txt = $(variable);
|
||||
var max = txt.data('cantidad');
|
||||
var value = parseInt(txt.val());
|
||||
@@ -235,16 +514,24 @@
|
||||
txt.val(0);
|
||||
}
|
||||
var importe = $('.txtimporte[data-cve="' + txt.data('cve') + '"]');
|
||||
|
||||
importe.val(parseFloat(txt.val()) * parseFloat(txt.data('pu')));
|
||||
FormatoMoneda2(importe);
|
||||
if (parseInt(txt.val()) > 0) {
|
||||
$($(txt.parent()).parent()).find(".linkfile").removeClass("hidden");
|
||||
} else {
|
||||
var ocultar = $($(txt.parent()).parent()).find(".linkfile");
|
||||
if (!ocultar.hasClass("hidden")) {
|
||||
ocultar.addClass("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
//FormatoMoneda2(importe);
|
||||
|
||||
//if (parseInt(txt.val()) > 0) {
|
||||
|
||||
// $($(txt.parent()).parent()).find(".linkfile").removeClass("hidden");
|
||||
|
||||
//} else {
|
||||
|
||||
// var ocultar = $($(txt.parent()).parent()).find(".linkfile");
|
||||
|
||||
// if (!ocultar.hasClass("hidden")) {
|
||||
// ocultar.addClass("hidden");
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
//);
|
||||
</script>
|
||||
|
||||
@@ -33,7 +33,22 @@ Partial Class Contratos_ContratoAvance
|
||||
Set(value As Integer)
|
||||
ViewState("CveContrato") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property CveContratoEstimacion As Integer
|
||||
Get
|
||||
If ViewState("CveContratoEstimacion") Is Nothing Then
|
||||
Return Nothing
|
||||
Else
|
||||
Return ViewState("CveContratoEstimacion").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveContratoEstimacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'fecha seleccionada del historico de avances
|
||||
Private Property fecha As String
|
||||
Get
|
||||
@@ -46,22 +61,31 @@ Partial Class Contratos_ContratoAvance
|
||||
Set(value As String)
|
||||
ViewState("fecha") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not IsPostBack Then
|
||||
BtnGuardar.Visible = False
|
||||
btnanexogral.Visible = False
|
||||
CargaContrato()
|
||||
btnanexogral.Visible = False
|
||||
CargaContrato()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "Filtros"
|
||||
|
||||
Private Sub CargaContrato()
|
||||
DdlContratos.DataSource = GlobalDTContratos.FiltraParametros(String.Format("CveContratoTipo=4"))
|
||||
DdlContratos.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (4,30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||
DdlContratos.DataBind()
|
||||
|
||||
DDlContratosEstimaciones.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (4,30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||
DDlContratosEstimaciones.DataBind()
|
||||
|
||||
|
||||
CargaddlAvance()
|
||||
End Sub
|
||||
|
||||
@@ -124,8 +148,10 @@ Partial Class Contratos_ContratoAvance
|
||||
End Sub
|
||||
Protected Sub GV_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles Gv.RowDataBound
|
||||
If e.Row.RowIndex > -1 Then
|
||||
|
||||
e.Row.FCTextBox("TxtCantidad").Visible = (fecha = "")
|
||||
e.Row.FCLinkButton("LnkAnexo").Visible = Not (fecha = "")
|
||||
e.Row.FCLinkButton("LnkAnexo").Visible = Not (fecha = "")
|
||||
|
||||
If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then
|
||||
e.Row.FCTextBox("TxtCantidad").Visible = False
|
||||
e.Row.FCLinkButton("LnkAnexo").Visible = False
|
||||
@@ -140,9 +166,32 @@ Partial Class Contratos_ContratoAvance
|
||||
e.Row.CssClass = "SubTotales3"
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("CveContratoDetalle").ToEntero > 0 Then
|
||||
|
||||
Dim LnkAnexo As LinkButton = e.Row.FCLinkButton("LnkModalDropzone")
|
||||
'LnkAnexo.Visible = True
|
||||
Dim DVAnexo As Control = DirectCast(e.Row.FindControl("ModalAnexoEvidencia"), Control)
|
||||
LnkAnexo.OnClientClick = $" $('#{DVAnexo.ClientID}').modal('show'); return false;"
|
||||
|
||||
If DdlAvances.SelectedIndex > 0 Then
|
||||
LnkAnexo.Visible = False
|
||||
Else
|
||||
LnkAnexo.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GetAnexos(sender As Object, e As System.EventArgs)
|
||||
Protected Sub GetAnexos(sender As Object, e As System.EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
|
||||
|
||||
LblTituloModalAnexo.Text = "Anexo " & GvRow.DataKey("PS")
|
||||
|
||||
'Get the button that raised the event
|
||||
Dim btn As LinkButton = DirectCast(sender, LinkButton)
|
||||
Dim gvr As GridViewRow = DirectCast(btn.NamingContainer, GridViewRow)
|
||||
@@ -154,22 +203,49 @@ Partial Class Contratos_ContratoAvance
|
||||
GvAnexos.Visible = True
|
||||
Else
|
||||
GvAnexos.Visible = False
|
||||
End If
|
||||
objContrato.Dispose()
|
||||
End If
|
||||
|
||||
objContrato.Dispose()
|
||||
|
||||
UpModalAnexos.Update()
|
||||
|
||||
RegistraScript("$('#ModalAnexos').modal('show');")
|
||||
|
||||
End Sub
|
||||
Protected Sub GvAnexos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GvAnexos.RowDataBound
|
||||
Protected Sub GvAnexos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GvAnexos.RowDataBound
|
||||
|
||||
If e.Row.RowIndex > -1 Then
|
||||
Dim Archivo As String = e.Row.DBCampo("Archivo").ToString
|
||||
Dim start As Integer = Len(Archivo.Split("-"c)(0))
|
||||
Dim link As HyperLink = e.Row.FCHyperLink("HPLArchivo")
|
||||
link.Text = Archivo.Substring(start + 1)
|
||||
link.NavigateUrl = String.Format("/Empresas/{0}/Contrato/{1}/Anexos/{2}", UsuarioActual.CveEmpresa, CveContrato, Archivo)
|
||||
Dim LnkArchivo As LinkButton = e.Row.FCLinkButton("LnkArchivo")
|
||||
|
||||
LnkArchivo.Text = Archivo.Substring(start + 1)
|
||||
'link.NavigateUrl = String.Format("/Empresas/{0}/Contrato/{1}/Anexos/{2}", UsuarioActual.CveEmpresa, CveContrato, Archivo)
|
||||
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkArchivo)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkArchivo_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
|
||||
Dim Archivo As String = GvRow.DataKey("Archivo").ToString
|
||||
|
||||
Response.ContentType = "application/octet-stream"
|
||||
Response.AppendHeader("Content-Disposition", $"attachment; filename={Archivo}")
|
||||
Response.TransmitFile($"{UsuarioActual.Empresa.Ruta}\Contrato\{DdlContratos.SelectedValue.ToEntero}\Anexos\{Archivo}")
|
||||
Response.End()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
Dim TieneError = False
|
||||
@@ -177,47 +253,58 @@ Partial Class Contratos_ContratoAvance
|
||||
Dim Cantidad As Double
|
||||
Dim filesgral As List(Of Archivo) = AnexoGral.getfiles().Archivos
|
||||
Dim guardarArchivos As New List(Of Archivo)
|
||||
For Each gvr As GridViewRow In Gv.Rows
|
||||
CveContratoDetalle = gvr.DataKey("CveContratoDetalle").ToEntero
|
||||
If CveContratoDetalle > 0 Then
|
||||
Cantidad = gvr.FCTextBox("TxtCantidad").Text.ToDouble
|
||||
|
||||
For Each gvr As GridViewRow In Gv.Rows
|
||||
|
||||
CveContratoDetalle = gvr.DataKey("CveContratoDetalle").ToEntero
|
||||
|
||||
If CveContratoDetalle > 0 Then
|
||||
|
||||
Cantidad = gvr.FCTextBox("TxtCantidad").Text.ToDouble
|
||||
|
||||
If Cantidad > 0 Then
|
||||
If ObjContratos.AddContratosAvance(CveContratoDetalle, Cantidad, TxtFecha.Text.ToDateTime, UsuarioActual.CveUsuario) Then
|
||||
If ObjContratos.AddContratosAvance(CveContratoDetalle, Cantidad, TxtFecha.Text.ToDateTime, UsuarioActual.CveUsuario) Then
|
||||
|
||||
Dim CveContratoAvance As Integer = ObjContratos.DtResultados.Rows(0)("CveContratoAvance").ToString.ToEntero
|
||||
Dim files As List(Of Archivo) = gvr.FCTextBox("TXTAnexo").getfiles().Archivos
|
||||
|
||||
For Each fileItem As Archivo In filesgral
|
||||
guardarArchivos.Add(fileItem)
|
||||
If Not ObjContratos.AddContratosAvanceAnexo(CveContratoAvance, fileItem.filename, UsuarioActual.CveUsuario) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
For Each fileItem As Archivo In files
|
||||
'For Each fileItem As Archivo In filesgral 'GENERAL
|
||||
' guardarArchivos.Add(fileItem)
|
||||
' If Not ObjContratos.AddContratosAvanceAnexo(CveContratoAvance, fileItem.filename, UsuarioActual.CveUsuario) Then
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
' End If
|
||||
'Next
|
||||
|
||||
For Each fileItem As Archivo In files
|
||||
guardarArchivos.Add(fileItem)
|
||||
If Not ObjContratos.AddContratosAvanceAnexo(CveContratoAvance, fileItem.filename, UsuarioActual.CveUsuario) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If TieneError Then
|
||||
ObjContratos.RollBack()
|
||||
Alert("No se logro guardar el Presupuesto favor de intentarlo mas tarde o comuniquese con soporte", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Dim urlsave As String = String.Format("Empresas\{0}\Contrato\{1}\Anexos", UsuarioActual.CveEmpresa, CveContrato)
|
||||
For Each fileItem As Archivo In filesgral
|
||||
fileItem.filename.filesMove(fileItem.filename, urlsave)
|
||||
Next
|
||||
Dim urlsave As String = String.Format("Empresas\{0}\Contrato\{1}\Anexos", UsuarioActual.CveEmpresa, CveContrato)
|
||||
For Each fileItem As Archivo In filesgral
|
||||
fileItem.filename.FilesMove(fileItem.filename, urlsave)
|
||||
Next
|
||||
|
||||
For Each fileItem As Archivo In guardarArchivos
|
||||
fileItem.filename.filesMove(fileItem.filename, urlsave)
|
||||
fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extencion}", ""), urlsave)
|
||||
Next
|
||||
ObjContratos.Commit()
|
||||
Alert("se guardo Correctamente")
|
||||
@@ -226,8 +313,117 @@ Partial Class Contratos_ContratoAvance
|
||||
ObjContratos.Dispose()
|
||||
CargaddlAvance()
|
||||
CargaDatosAvance()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region "ESTIMACION"
|
||||
|
||||
|
||||
Private Sub CargaAvancesParaEstimar()
|
||||
CveContratoEstimacion = -1
|
||||
|
||||
Dim ObjContratos As New ClsContratos()
|
||||
Dim DTEstimaciones As New DataTable
|
||||
|
||||
|
||||
If ObjContratos.GetContratosAvanceEstimacion(DDlContratosEstimaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
DTEstimaciones = ObjContratos.DtResultados
|
||||
|
||||
CveContratoEstimacion = DDlContratosEstimaciones.SelectedValue.ToEntero
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
ObjContratos.Dispose()
|
||||
|
||||
|
||||
If DTEstimaciones.Rows.Count > 0 Then
|
||||
GvEstimaciones.DataSource = DTEstimaciones
|
||||
BtnGuardarEstimacion.Visible = True
|
||||
Else
|
||||
GvEstimaciones.DataSource = Nothing
|
||||
BtnGuardarEstimacion.Visible = False
|
||||
End If
|
||||
GvEstimaciones.DataBind()
|
||||
|
||||
UpEstimaciones.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnConsultarEstimaciones_Click(sender As Object, e As EventArgs) Handles BtnConsultarEstimaciones.Click
|
||||
|
||||
CargaAvancesParaEstimar()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GvEstimaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstimaciones.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then
|
||||
|
||||
|
||||
If e.Row.DBCampo("CveSubFamilias").ToString.ToEntero = 0 Then
|
||||
If e.Row.DBCampo("CveFamilias").ToString.ToEntero = 0 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
Else
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
End If
|
||||
Else
|
||||
e.Row.CssClass = "SubTotales3"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BtnGuardarEstimacion_Click(sender As Object, e As EventArgs) Handles BtnGuardarEstimacion.Click
|
||||
|
||||
Dim ObjContratos As New ClsContratos()
|
||||
Dim ErrorProceso As Boolean = False
|
||||
Dim NuemeroEstimacion As Integer = -1
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
|
||||
|
||||
If ObjContratos.AddContratosAvanceEstimacion(CveContratoEstimacion, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
|
||||
NuemeroEstimacion = ObjContratos.NumeroEstimacionNueva
|
||||
|
||||
For Each GvRow As GridViewRow In GvEstimaciones.Rows
|
||||
|
||||
If GvRow.DataKey("CveContratoAvance").ToEntero > 0 Then
|
||||
If Not ObjContratos.UpdateContratosAvanceEstimacion(GvRow.DataKey("CveContratoAvance").ToEntero, ObjContratos.CveEstimacionNueva, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
'AddContratosAvanceEstimacion
|
||||
'UpdateContratosAvanceEstimacion
|
||||
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
ObjContratos.Commit()
|
||||
Alert($"Estimación {NuemeroEstimacion} agregada correctamente.")
|
||||
Else
|
||||
ObjContratos.RollBack()
|
||||
End If
|
||||
|
||||
ObjContratos.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -326,20 +326,40 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcionContrato" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcionContrato" Width="300px" BehaviorID="_content_VCEDescripcionContrato"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="trLicitacion" runat="server" class="row">
|
||||
<label class="col-md-2 truncate">Número Licitación:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtNumeroLicitacion" runat="server" MaxLength="70" Width="200px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="TrProveedor" runat="server">
|
||||
<label class="col-md-2 truncate ">
|
||||
<asp:Label ID="LblProveedor" runat="server" Text="Proveedor:"></asp:Label></label><div class="col-md-10">
|
||||
<asp:Label ID="LblProveedor" runat="server" Text="Proveedor:"></asp:Label></label>
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlContratista" runat="server" CssClass="input-sm form-control select2me" AppendDataBoundItems="True" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 350px !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" >
|
||||
<label class="col-md-2 truncate ">
|
||||
<asp:Label ID="LblCliente" runat="server" Text="Cliente:"></asp:Label></label>
|
||||
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="True" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-sm select2me" Style="width: 350px !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row" style="display: none;">
|
||||
<label class="col-md-2 truncate ">Ubicacion:</label>
|
||||
<div class="col-md-10">
|
||||
@@ -460,9 +480,7 @@
|
||||
<div class="row" id="TrCliente" runat="server" visible="False">
|
||||
<label class="col-md-2 truncate">
|
||||
<asp:Label ID="Label1" runat="server" Text="Cliente:"></asp:Label></label><div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlCliente" AutoPostBack="True" OnSelectedIndexChanged="DdlCliente_SelectedIndexChanged" runat="server" AppendDataBoundItems="True" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-sm select2me" Width="75%" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel runat="server">
|
||||
@@ -929,7 +947,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="Gv" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos"
|
||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,OCInterna,NoIdentificacion"
|
||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,OCInterna,NoIdentificacion,PermitirAvance"
|
||||
ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="OC <br/> Cliente">
|
||||
@@ -997,7 +1015,6 @@
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Precio Unitario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPU" Text='<%# Eval("PU", "{0:###,###,##0.00##}")%>' runat="server"></asp:Literal>
|
||||
@@ -1013,12 +1030,18 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Avance" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="CHKPAvance" Enabled="false" AutoPostBack="true" OnCheckedChanged="AvaClick" runat="server" />
|
||||
<asp:TemplateField HeaderText="Avance" Visible="True">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:LinkButton runat="server" ID="LnkHabilitaAvance" Text= "" OnClick="LnkHabilitaAvance_Click" Enabled="false"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Habilitar el avance?" data-btn-ok-label="si" ></asp:LinkButton>
|
||||
|
||||
<asp:CheckBox ID="CHKPAvance" Enabled="True" Visible="false" AutoPostBack="true" OnCheckedChanged="AvaClick" runat="server" />
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -362,12 +362,12 @@ Partial Class Contratos_ContratoObra
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargaValoresIniciales()
|
||||
CreaDtTmpFianzas()
|
||||
|
||||
If Request("CveCliente") IsNot Nothing Then
|
||||
cargaClientes()
|
||||
End If
|
||||
|
||||
CreaDtTmpFianzas()
|
||||
|
||||
|
||||
cargaClientes()
|
||||
|
||||
|
||||
If Request("CveContrato") IsNot Nothing AndAlso IsNumeric(Request("CveContrato")) AndAlso Request("CveContrato").ToEntero > 0 Then
|
||||
ViewState("CveContrato") = Request("CveContrato")
|
||||
|
||||
@@ -474,6 +474,11 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
End If
|
||||
|
||||
|
||||
TabAvanveDocumento.Visible = False
|
||||
TabContratosGastos.Visible = False
|
||||
TabPed.Visible = False
|
||||
|
||||
End Sub
|
||||
|
||||
#Region " CARGA VALORES INICIALES "
|
||||
@@ -545,13 +550,13 @@ Partial Class Contratos_ContratoObra
|
||||
End Sub
|
||||
Public Function isWithFamily() As Boolean
|
||||
Return UsuarioActual.CveEmpresa = 66
|
||||
End Function
|
||||
Private Sub cargaClientes()
|
||||
TrCliente.Visible = True
|
||||
TrProveedor.Visible = False
|
||||
End Function
|
||||
|
||||
Private Sub cargaClientes()
|
||||
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlCliente.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CreaDT()
|
||||
TmpDT = New DataTable
|
||||
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||
@@ -924,9 +929,10 @@ Partial Class Contratos_ContratoObra
|
||||
#Region " CARGA DATOS "
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjContratos As New ClsContratos()
|
||||
Dim Ruta = Request.ApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
'DivTipoContrato.Visible = False
|
||||
|
||||
Dim Ruta = Request.ApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
'DivTipoContrato.Visible = False
|
||||
|
||||
|
||||
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
If ObjContratos.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
@@ -950,7 +956,7 @@ Partial Class Contratos_ContratoObra
|
||||
' TxtPorcentajeComision.Text = ObjContratos.PorcentajeComision.ToString
|
||||
CveTipoContrato = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero
|
||||
TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString
|
||||
|
||||
DdlCliente.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CveCliente").ToString)
|
||||
|
||||
If ObjContratos.CveProveedor > 0 Then
|
||||
TrProveedor.Visible = True
|
||||
@@ -2042,12 +2048,14 @@ Partial Class Contratos_ContratoObra
|
||||
End Sub
|
||||
Protected Sub GV_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles Gv.RowDataBound
|
||||
|
||||
If e.Row.RowIndex > -1 Then
|
||||
|
||||
e.Row.FCCheckBox("CHKPAvance").Visible = Autorizado
|
||||
'e.Row.FCCheckBox("CHKPEstimacion").Visible = Autorizado
|
||||
If e.Row.RowIndex > -1 Then
|
||||
|
||||
Dim LnkHabilitaAvance As LinkButton = e.Row.FCLinkButton("LnkHabilitaAvance")
|
||||
' e.Row.FCCheckBox("CHKPAvance").Visible = Autorizado
|
||||
'e.Row.FCCheckBox("CHKPEstimacion").Visible = Autorizado
|
||||
If UsuarioActual.TienePermisoProceso(124) Then
|
||||
e.Row.FCCheckBox("CHKPAvance").Enabled = True
|
||||
LnkHabilitaAvance.Enabled = True
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("PermitirAvance").ToString = "1" Then
|
||||
@@ -2065,7 +2073,20 @@ Partial Class Contratos_ContratoObra
|
||||
If CveTipoContrato = 25 Then
|
||||
e.Row.Cells(1).Width = Unit.Pixel(10)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(250)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If e.Row.DBCampo("PermitirAvance").ToString = "1" Then
|
||||
LnkHabilitaAvance.Text = "<i class='fa fa-check-square-o' aria-hidden='true'></i>"
|
||||
LnkHabilitaAvance.Attributes.Add("data-original-title", "¿Deshabilitar avance?")
|
||||
Else
|
||||
LnkHabilitaAvance.Text = "<i class='fa fa-square-o' aria-hidden='true'></i>"
|
||||
LnkHabilitaAvance.Attributes.Add("data-original-title", "¿Habilitar avance?")
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCDropDownList("DdlUMEdit").DataSource = GlobalDTProductosServiciosEquivalencias(e.Row.DataKey("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
@@ -5026,6 +5047,36 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkHabilitaAvance_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
|
||||
Dim PermitirAvance As Integer = GvRow.DataKey("PermitirAvance").ToEntero
|
||||
|
||||
'Get the button that raised the event
|
||||
'Dim btn As CheckBox = DirectCast(sender, CheckBox)
|
||||
'Dim gvr As GridViewRow = DirectCast(btn.NamingContainer, GridViewRow)
|
||||
|
||||
Dim CveContratoDetalle As Integer = GvRow.DataKey("CveContratoDetalle").ToString.ToEntero
|
||||
Dim objContrato As New ClsContratos
|
||||
|
||||
If objContrato.UpdateContratosDetalleAvance(CveContratoDetalle, IIf(PermitirAvance = 1, 0, 1).ToString.ToEntero) Then
|
||||
Dim row = TmpDT.Select(String.Format("CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||
|
||||
row("PermitirAvance") = IIf(PermitirAvance = 1, 0, 1).ToString.ToEntero
|
||||
|
||||
|
||||
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
||||
|
||||
|
||||
Alert("Se ha permitido levantar avance", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("no se pudo permitir avance", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
objContrato.Dispose()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepContratosAvances.aspx.vb" Inherits="RepContratosAvances" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Contratos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="PnlFiltros" runat="server" DefaultButton="CmdConsultar">
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT" style="">
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline" id="TrProgramar" runat="server">
|
||||
<li>Cliente:
|
||||
<asp:DropDownList ID="DdlCliente" runat="server" AutoPostBack="true" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Contratos:
|
||||
<asp:DropDownList ID="DdlContrato" runat="server" AutoPostBack="true" DataTextField="NumeroContrato" DataValueField="CveContrato" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li style="display: none;">Sección:
|
||||
<asp:DropDownList ID="DdlSeccion" runat="server" AutoPostBack="false" DataTextField="Seccion" DataValueField="CveSeccion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Partida:
|
||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 90px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Productos y Servicios:
|
||||
<asp:DropDownList ID="DdlPS" runat="server" AutoPostBack="true" DataTextField="PS" DataValueField="CvePS" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:Button ID="CmdConsultar" runat="server" Text="Consultar" class="btn btn-primary" CausesValidation="true" ValidationGroup="GrConsulta" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="60px">#</th>
|
||||
<th width="300px">
|
||||
<asp:LinkButton ID="LbSubSeccion" runat="server" CausesValidation="false" Text="Cliente/ Contrato / Partida" /></th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" Text="Contratado" /></th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="false" Text="Actual" /></th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LinkButton5" runat="server" CausesValidation="false" Text="Por Estimar" /></th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="false" Text="Ejecutado" /></th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="false" Text="Obra Faltante" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Estimaciones con los Filtros seleccionados" DataKeyNames="CveContrato" ShowHeader="false" SelectedRowStyle-BackColor="#CCFF66" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitEst" runat="server" Text='<%# Eval("CveContrato")%>' />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplAgrupador" CssClass="Texto" runat="server" Text='<%# Eval("Agrupador") %>' NavigateUrl='<%# Eval("CveContrato", "ContratosDetalle.aspx?CveContrato={0}&Op=2")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplContratado" CssClass="Texto" runat="server" Text='<%# Eval("Contratado", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplActual" CssClass="Texto" runat="server" Text='<%# Eval("LoQueEstoyHaciendo", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HPlPorEstimar" CssClass="Texto" runat="server" Text='<%# Eval("PorEstimar", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplEjecutado" CssClass="Texto" runat="server" Text='<%# Eval("Ejecutado", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplOFA" CssClass="Texto" runat="server" Text='<%# Eval("OFA", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
<br />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
169
Contratos/RepContratosObraAvances.aspx
Normal file
169
Contratos/RepContratosObraAvances.aspx
Normal file
@@ -0,0 +1,169 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepContratosObraAvances.aspx.vb" Inherits="RepContratosObraAvances" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte Contratos Avance
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<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" >
|
||||
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" CausesValidation="true" ValidationGroup="GrConsulta" />
|
||||
</div>
|
||||
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<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="MEEFechaI" 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="GrConsulta"></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="GrConsulta"></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">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<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="MEEFechaF" 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="GrConsulta"></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="GrConsulta"></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>
|
||||
|
||||
<div class="col-md-1">
|
||||
Cliente:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" Class="select2me" Width="100PX" ></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
Contrato:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlContrato" runat="server" DataTextField="NumeroContrato" DataValueField="CveContrato" Class="select2me" Width="100PX" ></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12" style="text-align:right!important">
|
||||
<div style="display: inline-block">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GVDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron contratos con los Filtros seleccionados"
|
||||
DataKeyNames="CveContrato,NumeroContrato" ShowHeader="True"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Fecha I.">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LitEst" runat="server" Text='<%# Eval("FechaInicial", "{0:dd/MM/yyyy}")%>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplCliente" CssClass="Texto" runat="server" Text='<%# Eval("Nombre") %>' NavigateUrl='<%# Eval("CveCliente", "../Ventas/Clientes.aspx?CveCliente={0}")%>' Target="_blank" ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="# Contrato">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplContratado" CssClass="Texto" runat="server" Text='<%# Eval("NumeroContrato")%>' Target="_blank" ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descripción">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblDescripcion" CssClass="Texto" runat="server" Text='<%# Eval("DescripcionContrato")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblImporte" CssClass="Texto" runat="server" Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Avance %" >
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblIAvancePorcentaje" runat="server" Text='<%# Eval("AvancePorcentaje", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Avance $">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HplOFA" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporte", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
80
Contratos/RepContratosObraAvances.aspx.vb
Normal file
80
Contratos/RepContratosObraAvances.aspx.vb
Normal file
@@ -0,0 +1,80 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
|
||||
Partial Class RepContratosObraAvances
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargaClientes()
|
||||
CargaContratos()
|
||||
'CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim Con As New ClsContratos
|
||||
|
||||
If Con.GetContratosObraRepAvances(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero, DdlContrato.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GVDatos.DataSource = Con.DtResultados
|
||||
Else
|
||||
GVDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
Con.Dispose()
|
||||
|
||||
GVDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "C O M B O S"
|
||||
|
||||
|
||||
Private Sub CargaContratos()
|
||||
DdlContrato.DataSource = GlobalDTContratos.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveContratoTipo IN(30,31) ")
|
||||
DdlContrato.DataBind()
|
||||
DdlContrato.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaClientes()
|
||||
Dim dt As DataTable = Nothing
|
||||
Dim Cli As New ClsClientes
|
||||
If Cli.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
dt = Cli.DtResultados
|
||||
End If
|
||||
Cli.Dispose()
|
||||
DdlCliente.DataSource = dt
|
||||
DdlCliente.DataBind()
|
||||
DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVDatos.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim HplContratado As HyperLink = e.Row.FCHyperLink("HplContratado")
|
||||
|
||||
HplContratado.NavigateUrl = $"./RepContratosObraAvancesDetalle.aspx?CveContrato={e.Row.DataKey("CveContrato")}&NumeroContrato={e.Row.DataKey("NumeroContrato")}"
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub CmdConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
179
Contratos/RepContratosObraAvancesDetalle.aspx
Normal file
179
Contratos/RepContratosObraAvancesDetalle.aspx
Normal file
@@ -0,0 +1,179 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepContratosObraAvancesDetalle.aspx.vb" Inherits="RepContratosObraAvancesDetalle" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte Contratos Avance Detalle
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<%-- <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" >
|
||||
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" CausesValidation="true" ValidationGroup="GrConsulta" />
|
||||
</div>
|
||||
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<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="MEEFechaI" 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="GrConsulta"></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="GrConsulta"></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">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<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="MEEFechaF" 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="GrConsulta"></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="GrConsulta"></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>
|
||||
|
||||
<div class="col-md-1">
|
||||
Cliente:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" Class="select2me" Width="100PX" ></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
Contrato:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlContrato" runat="server" DataTextField="NumeroContrato" DataValueField="CveContrato" Class="select2me" Width="100PX" ></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3" style="text-align:left!important">
|
||||
<strong><asp:Label runat="server" ID="LblNumeroContrato"></asp:Label></strong>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="text-align:right!important">
|
||||
<div style="display: inline-block">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:GridView ID="GVDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron contratos con los Filtros seleccionados"
|
||||
DataKeyNames="CveEstimacion,NumeroEstimacion" ShowHeader="True"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="# Estimación">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplNumeroEstimacion" CssClass="Texto" runat="server" Text='<%# Eval("NumeroEstimacion") %>' Target="_blank" ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblFecha" runat="server" Text='<%# Eval("FechaEstimacion", "{0:dd/MM/yyyy}")%>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Avance %" >
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblIAvancePorcentaje" runat="server" Text='<%# Eval("AvancePorcentaje", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Avance acumulado %" >
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblIAvancePorcentajeAcumulado" runat="server" Text='<%# Eval("AvanceAcumuladoPorcentaje", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Avance $">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HplOFA" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporte", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Facturado">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblFacturado" CssClass="Texto" runat="server" Text='<%# Eval("Facturado")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
100
Contratos/RepContratosObraAvancesDetalle.aspx.vb
Normal file
100
Contratos/RepContratosObraAvancesDetalle.aspx.vb
Normal file
@@ -0,0 +1,100 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
|
||||
Partial Class RepContratosObraAvancesDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
Property CveContrato As Integer
|
||||
|
||||
Get
|
||||
If ViewState("CveContrato") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveContrato").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveContrato") = value
|
||||
End Set
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CveContrato = If(Request("CveContrato") IsNot Nothing AndAlso Request("CveContrato").ToString.ToEntero > 0, Request("CveContrato").ToString.ToEntero, -1)
|
||||
LblNumeroContrato.Text = If(Request("NumeroContrato") IsNot Nothing AndAlso Request("NumeroContrato").ToString.Length > 0, $"Numero Contrato: {Request("NumeroContrato").ToString}", "")
|
||||
|
||||
If CveContrato > 0 Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim Con As New ClsContratos
|
||||
|
||||
If Con.GetContratosObraRepAvancesDetalle(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
GVDatos.DataSource = Con.DtResultados
|
||||
|
||||
If Con.DtResultados.Rows.Count = 0 Then
|
||||
Alert("No se encontraron estimaciones.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
GVDatos.DataSource = Nothing
|
||||
|
||||
End If
|
||||
|
||||
Con.Dispose()
|
||||
|
||||
GVDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
'#Region "C O M B O S"
|
||||
|
||||
|
||||
' Private Sub CargaContratos()
|
||||
' DdlContrato.DataSource = GlobalDTContratos.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveContratoTipo IN(30,31) ")
|
||||
' DdlContrato.DataBind()
|
||||
' DdlContrato.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todos", "-1"))
|
||||
' End Sub
|
||||
|
||||
' Private Sub CargaClientes()
|
||||
' Dim dt As DataTable = Nothing
|
||||
' Dim Cli As New ClsClientes
|
||||
' If Cli.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
' dt = Cli.DtResultados
|
||||
' End If
|
||||
' Cli.Dispose()
|
||||
' DdlCliente.DataSource = dt
|
||||
' DdlCliente.DataBind()
|
||||
' DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
' End Sub
|
||||
|
||||
'#End Region
|
||||
|
||||
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVDatos.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim HplNumeroEstimacion As HyperLink = e.Row.FCHyperLink("HplNumeroEstimacion")
|
||||
HplNumeroEstimacion.NavigateUrl = $"./RepContratosObraAvancesPartida.aspx?CveEstimacion={e.Row.DataKey("CveEstimacion")}&NumeroEstimacion={ e.Row.DataKey("NumeroEstimacion")}&CveContrato={ CveContrato }"
|
||||
|
||||
' NavigateUrl='<%# Eval("CveEstimacion", "RepContratosObraAvancesPartida.aspx?CveEstimacion={0}")%>'
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
'Protected Sub CmdConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
' CargaDatos()
|
||||
'End Sub
|
||||
|
||||
|
||||
End Class
|
||||
213
Contratos/RepContratosObraAvancesPartida.aspx
Normal file
213
Contratos/RepContratosObraAvancesPartida.aspx
Normal file
@@ -0,0 +1,213 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepContratosObraAvancesPartida.aspx.vb" Inherits="RepContratosObraAvancesPartida" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte Contratos Avance por partida
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<%-- <asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="PnlFiltros" runat="server" DefaultButton="CmdConsultar">
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT" style="">
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline" id="TrProgramar" runat="server">
|
||||
<li>Cliente:
|
||||
<asp:DropDownList ID="DdlCliente" runat="server" AutoPostBack="true" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Contratos:
|
||||
<asp:DropDownList ID="DdlContrato" runat="server" AutoPostBack="true" DataTextField="NumeroContrato" DataValueField="CveContrato" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li style="display: none;">Sección:
|
||||
<asp:DropDownList ID="DdlSeccion" runat="server" AutoPostBack="false" DataTextField="Seccion" DataValueField="CveSeccion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Partida:
|
||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 90px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Productos y Servicios:
|
||||
<asp:DropDownList ID="DdlPS" runat="server" AutoPostBack="true" DataTextField="PS" DataValueField="CvePS" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:Button ID="CmdConsultar" runat="server" Text="Consultar" class="btn btn-primary" CausesValidation="true" ValidationGroup="GrConsulta" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3" style="text-align:left!important">
|
||||
<strong> <asp:Label runat="server" ID="LblEstimacion"></asp:Label></strong>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="text-align:right!important">
|
||||
<div style="display: inline-block">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:GridView ID="GVDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron contratos con los Filtros seleccionados"
|
||||
DataKeyNames="CveContrato,CveEstimacion,Fecha,PS,CveContratoDetalle" ShowHeader="True"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Producto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("PS")%>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="PU" >
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPU" runat="server" Text='<%# Eval("PU", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Avance $">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblAvanceImporte" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporte", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Avance Anterior$">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblAvanceImporteAnterior" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporteAnterior", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Avance Acumulado $">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblAvanceAcumulado" CssClass="Texto" runat="server" Text='<%# Eval("AvanceAcumulado", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText=" ">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplCliente" CssClass="Texto" runat="server" Text='<%# Eval("Nombre") %>' NavigateUrl='<%# Eval("CveCliente", "../Ventas/Clientes.aspx?CveCliente={0}")%>' Target="_blank" ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="# Contrato">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplContratado" CssClass="Texto" runat="server" Text='<%# Eval("NumeroContrato")%>' NavigateUrl='<%# Eval("CveContrato", "RepContratosObraAvancesDetalle.aspx?CveContrato={0}") %>' Target="_blank" ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descripción">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblDescripcion" CssClass="Texto" runat="server" Text='<%# Eval("DescripcionContrato")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Avance %" >
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblIAvancePorcentaje" runat="server" Text='<%# Eval("AvancePorcentaje", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Avance $">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HplOFA" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporte", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<div id="ModalAnexos" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<asp:UpdatePanel ID="UpModalAnexos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label runat="server" ID="LblTituloModalAnexo"></asp:Label></h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12" style="text-align:center!important">
|
||||
<asp:GridView ID="GvAnexos" AutoGenerateColumns="false" runat="server" ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron archivos" Width="100"
|
||||
DataKeyNames="Archivo" CssClass="table GVEstimacion table-advance table-hover" GridLines ="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Anexos">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:LinkButton ID="LnkArchivo" runat="server" OnClick="LnkArchivo_Click"></asp:LinkButton>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
150
Contratos/RepContratosObraAvancesPartida.aspx.vb
Normal file
150
Contratos/RepContratosObraAvancesPartida.aspx.vb
Normal file
@@ -0,0 +1,150 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
|
||||
Partial Class RepContratosObraAvancesPartida
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
|
||||
Property CveEstimacion As Integer
|
||||
|
||||
Get
|
||||
If ViewState("CveEstimacion") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveEstimacion").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveEstimacion") = value
|
||||
End Set
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Property CveContrato As Integer
|
||||
|
||||
Get
|
||||
If ViewState("CveContrato") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveContrato").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveContrato") = value
|
||||
End Set
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CveEstimacion = If(Request("CveEstimacion") IsNot Nothing AndAlso Request("CveEstimacion").ToString.ToEntero > 0, Request("CveEstimacion").ToString.ToEntero, -1)
|
||||
CveContrato = If(Request("CveContrato") IsNot Nothing AndAlso Request("CveContrato").ToString.ToEntero > 0, Request("CveContrato").ToString.ToEntero, -1)
|
||||
|
||||
LblEstimacion.Text = If(Request("NumeroEstimacion") IsNot Nothing AndAlso Request("NumeroEstimacion").ToString.Length > 0, $"Numero Estimacion: {Request("NumeroEstimacion").ToString}", "")
|
||||
|
||||
|
||||
If CveEstimacion > 0 Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim Con As New ClsContratos
|
||||
|
||||
If Con.GetContratosObraRepAvancesPartida(CveEstimacion, UsuarioActual.CveEmpresa) Then
|
||||
GVDatos.DataSource = Con.DtResultados
|
||||
|
||||
If Con.DtResultados.Rows.Count = 0 Then
|
||||
Alert("No se encontraron partidas.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
GVDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
Con.Dispose()
|
||||
|
||||
GVDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVDatos.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GetAnexos(sender As Object, e As System.EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
|
||||
|
||||
LblTituloModalAnexo.Text = "Anexo " & GvRow.DataKey("PS")
|
||||
|
||||
'Get the button that raised the event
|
||||
'Dim CveContratoDetalle As Integer = gvr.DataKey("CveContratoDetalle").ToString.ToEntero
|
||||
Dim Fecha As Date = GvRow.DataKey("Fecha").ToDate
|
||||
Dim CveEstimacion As Integer = GvRow.DataKey("CveEstimacion").ToEntero
|
||||
Dim CveContratoDetalle As Integer = GvRow.DataKey("CveContratoDetalle").ToEntero
|
||||
|
||||
Dim objContrato As New ClsContratos
|
||||
If objContrato.GetContratosAvanceAnexos(CveContratoDetalle, Fecha, UsuarioActual.CveUsuario, CveEstimacion:=CveEstimacion) Then
|
||||
GvAnexos.DataSource = objContrato.DtResultados
|
||||
GvAnexos.DataBind()
|
||||
GvAnexos.Visible = True
|
||||
Else
|
||||
GvAnexos.Visible = False
|
||||
End If
|
||||
|
||||
objContrato.Dispose()
|
||||
|
||||
UpModalAnexos.Update()
|
||||
|
||||
RegistraScript("$('#ModalAnexos').modal('show');")
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvAnexos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GvAnexos.RowDataBound
|
||||
|
||||
If e.Row.RowIndex > -1 Then
|
||||
Dim Archivo As String = e.Row.DBCampo("Archivo").ToString
|
||||
Dim start As Integer = Len(Archivo.Split("-"c)(0))
|
||||
Dim LnkArchivo As LinkButton = e.Row.FCLinkButton("LnkArchivo")
|
||||
|
||||
LnkArchivo.Text = Archivo.Substring(start + 1)
|
||||
'link.NavigateUrl = String.Format("/Empresas/{0}/Contrato/{1}/Anexos/{2}", UsuarioActual.CveEmpresa, CveContrato, Archivo)
|
||||
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkArchivo)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkArchivo_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
|
||||
Dim Archivo As String = GvRow.DataKey("Archivo").ToString
|
||||
|
||||
Response.ContentType = "application/octet-stream"
|
||||
Response.AppendHeader("Content-Disposition", $"attachment; filename={Archivo}")
|
||||
Response.TransmitFile($"{UsuarioActual.Empresa.Ruta}\Contrato\{CveContrato}\Anexos\{Archivo}")
|
||||
Response.End()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user