Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -10,162 +10,61 @@
|
||||
Catálogo de Clasificación Funcional
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
|
||||
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarClasificacionFuncional" data-toggle="tooltip" data-placement="left" title="Agregar una Clasificación Funcional" Text="<i class='fa fa-plus'></i>Agregar Clasificación Funcional"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="BtnImprimir_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="ImgExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkPdf" />
|
||||
<asp:PostBackTrigger ControlID="LnkExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover Widthall">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">
|
||||
<asp:LinkButton ID="LbClasificacionFuncional" runat="server" CausesValidation="false" Text="" CommandArgument="ClasificacionFuncional;0" OnClick="LbOrden_Click">
|
||||
Clasificación Funcional
|
||||
<asp:Literal ID="ImgClasificacionFuncional" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:LinkButton ID="LbClaveClasificacionFuncional" runat="server" CausesValidation="false" Text="" CommandArgument="ClaveClasificacionFuncional;0" OnClick="LbOrden_Click">
|
||||
Clave
|
||||
<asp:Literal ID="ImgClaveClasificacionFuncional" runat="server" Text="<i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus;0" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng;0" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario;0" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtClasificacionFuncional" runat="server" CausesValidation="true" MaxLength="395" ValidationGroup="GrpGuardar" Width="384px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClasificacionFuncional" runat="server" ControlToValidate="TxtClasificacionFuncional" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ClasificacionFuncional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClasificacionFuncional" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionFuncional" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtClaveClasificacionFuncional" runat="server" CausesValidation="true" MaxLength="5" ValidationGroup="GrpGuardar" Width="80px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClaveClasificacionFuncional" runat="server" ControlToValidate="TxtClaveClasificacionFuncional" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ClaveClasificacionFuncional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClaveClasificacionFuncional" runat="server" HighlightCssClass="vco" TargetControlID="RFVClaveClasificacionFuncional" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveClasificacionFuncional" EmptyDataText="No se encontraron Clasificaciones Registrados" ToolTip="Listado de ClasificacionFuncional" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlClasificacionFuncional" runat="server" Text='<%# Eval("ClasificacionFuncional", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtClasificacionFuncional" runat="server" CausesValidation="true" MaxLength="100" Text='<%# Eval("ClasificacionFuncional") %>' ValidationGroup="GrpGV" Width="384px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClasificacionFuncional" runat="server" ControlToValidate="TxtClasificacionFuncional" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ClasificacionFuncional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClasificacionFuncional" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionFuncional" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlClaveClasificacionFuncional" runat="server" Text='<%# Eval("ClaveClasificacionFuncional", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtClaveClasificacionFuncional" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("ClaveClasificacionFuncional") %>' ValidationGroup="GrpGV" Width="88px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClaveClasificacionFuncional" runat="server" ControlToValidate="TxtClaveClasificacionFuncional" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ClaveClasificacionFuncional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClaveClasificacionFuncional" runat="server" HighlightCssClass="vco" TargetControlID="RFVClaveClasificacionFuncional" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True"
|
||||
CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False"
|
||||
CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</center>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False"
|
||||
CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveClasificacionFuncional,ClasificacionFuncional,ClaveClasificacionFuncional,Estatus,FechaIng"
|
||||
EmptyDataText="No se encontraron Clasificaciones Registrados" ToolTip="Listado de ClasificacionFuncional" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Clasificación Funcional" DataField="ClasificacionFuncional" DataFormatString="{0}" ItemStyle-Width="400px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Clave" DataField="ClaveClasificacionFuncional" DataFormatString="{0}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0}" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<table runat="server" id="Tbl" style="display:none;">
|
||||
<table runat="server" id="Tbl" style="display: none;">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Clasificación Funcional" DataField="ClasificacionFuncional" DataFormatString="{0}" ItemStyle-Width="400px" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Clave" DataField="ClaveClasificacionFuncional" DataFormatString="{0}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0}" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Clasificación Funcional" DataField="ClasificacionFuncional" DataFormatString="{0}" ItemStyle-Width="400px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Clave" DataField="ClaveClasificacionFuncional" DataFormatString="{0}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0}" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
@@ -176,7 +75,42 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="DivAgregarClasifFuncional" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Clasificación Funcional</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtClasificacionFuncional" runat="server" CssClass="form-control " CausesValidation="true" MaxLength="395" ValidationGroup="GrpGuardar" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClasificacionFuncional" runat="server" ControlToValidate="TxtClasificacionFuncional" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ClasificacionFuncional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClasificacionFuncional" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionFuncional" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="TxtClasificacionFuncional">Clasificación Funcional:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtClaveClasificacionFuncional" runat="server" CausesValidation="true" MaxLength="5" ValidationGroup="GrpGuardar" Width="80px" CssClass="form-control "></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClaveClasificacionFuncional" runat="server" ControlToValidate="TxtClaveClasificacionFuncional" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ClaveClasificacionFuncional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClaveClasificacionFuncional" runat="server" HighlightCssClass="vco" TargetControlID="RFVClaveClasificacionFuncional" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="TxtClaveClasificacionFuncional">Clave:</label>
|
||||
</div>
|
||||
<div id="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardar" />
|
||||
<%--<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton>--%>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -9,6 +9,14 @@ Imports Microsoft.Reporting.WebForms
|
||||
Partial Class AC_CatClasificacionFuncional
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveClasificacionFuncional() As Integer 'Guardamos el ID de registro para saber cual registro Editar
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveClasificacionFuncional")), -1, CInt(ViewState("CveClasificacionFuncional")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveClasificacionFuncional") = Value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtClasificacionFuncional As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtClasificacionFuncional"), DataTable)
|
||||
@@ -61,51 +69,32 @@ Partial Class AC_CatClasificacionFuncional
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjClasificacionFuncional As New ClsAC
|
||||
If ObjClasificacionFuncional.AddClasificacionFuncional(TxtClasificacionFuncional.Text.Trim, TxtClaveClasificacionFuncional.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtClasificacionFuncional.Text = ""
|
||||
TxtClaveClasificacionFuncional.Text = ""
|
||||
Alert("El Nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTClasificacionFuncional") = ObjClasificacionFuncional.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionFuncional(UsuarioActual.CveEmpresa) = ObjClasificacionFuncional.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjClasificacionFuncional.Dispose()
|
||||
Protected Sub BtnAgregarClasificacionFuncional_Click(sender As Object, e As EventArgs) Handles BtnAgregarClasificacionFuncional.Click
|
||||
TxtClasificacionFuncional.Text = ""
|
||||
TxtClaveClasificacionFuncional.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
CheckActiveSection.Visible = False
|
||||
LbAgregar.Text = "Agregar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarClasifFuncional"))
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(400)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(105)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(65)
|
||||
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
CveClasificacionFuncional = GvRow.DataKey("CveClasificacionFuncional").ToEntero
|
||||
TxtClasificacionFuncional.Text = GvRow.DataKey("ClasificacionFuncional")
|
||||
TxtClaveClasificacionFuncional.Text = GvRow.DataKey("ClaveClasificacionFuncional")
|
||||
CheckActiveSection.Visible = True
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus") = "Activo"
|
||||
LbAgregar.Text = "Actualizar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarClasifFuncional"))
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ObjClasificacionFuncional As New ClsAC
|
||||
If ObjClasificacionFuncional.RemoveClasificacionFuncional(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
If ObjClasificacionFuncional.RemoveClasificacionFuncional(GvRow.DataKey("CveClasificacionFuncional").ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTClasificacionFuncional") = ObjClasificacionFuncional.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionFuncional(UsuarioActual.CveEmpresa) = ObjClasificacionFuncional.DtResultados
|
||||
@@ -121,6 +110,81 @@ Partial Class AC_CatClasificacionFuncional
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjClasificacionFuncional As New ClsAC
|
||||
If LbAgregar.Text = "Agregar" Then
|
||||
If ObjClasificacionFuncional.AddClasificacionFuncional(TxtClasificacionFuncional.Text.Trim, TxtClaveClasificacionFuncional.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtClasificacionFuncional.Text = ""
|
||||
TxtClaveClasificacionFuncional.Text = ""
|
||||
Alert("El Nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
'UpTitulos.Update()
|
||||
ViewState("DTClasificacionFuncional") = ObjClasificacionFuncional.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionFuncional(UsuarioActual.CveEmpresa) = ObjClasificacionFuncional.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If ObjClasificacionFuncional.UpdateClasificacionFuncional(TxtClasificacionFuncional.Text.Trim, TxtClaveClasificacionFuncional.Text.Trim, ChkEstatus.Checked, CveClasificacionFuncional) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTClasificacionFuncional") = ObjClasificacionFuncional.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionFuncional(UsuarioActual.CveEmpresa) = ObjClasificacionFuncional.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjClasificacionFuncional.Dispose()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarClasifFuncional"))
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(400)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
'e.Row.Cells(5).Width = Unit.Pixel(105)
|
||||
'e.Row.Cells(6).Width = Unit.Pixel(65)
|
||||
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
' Dim ObjClasificacionFuncional As New ClsAC
|
||||
' If ObjClasificacionFuncional.RemoveClasificacionFuncional(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
' GvDatos.EditIndex = -1
|
||||
' ViewState("DTClasificacionFuncional") = ObjClasificacionFuncional.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
' GlobalDTAC_ClasificacionFuncional(UsuarioActual.CveEmpresa) = ObjClasificacionFuncional.DtResultados
|
||||
' Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
' End If
|
||||
|
||||
' ObjClasificacionFuncional.Dispose()
|
||||
|
||||
' If ViewState("Orden").ToString() <> String.Empty Then
|
||||
' CargaGrid(ViewState("Orden").ToString())
|
||||
' Else
|
||||
' CargaGrid("")
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
@@ -130,32 +194,6 @@ Partial Class AC_CatClasificacionFuncional
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
|
||||
Dim ObjClasificacionFuncional As New ClsAC
|
||||
|
||||
Dim ClasificacionFuncional As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtClasificacionFuncional"), TextBox).Text.Trim
|
||||
Dim ClaveClasificacionFuncional As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtClaveClasificacionFuncional"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveClasificacionFuncional As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjClasificacionFuncional.UpdateClasificacionFuncional(ClasificacionFuncional, ClaveClasificacionFuncional, Estatus, CveClasificacionFuncional) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTClasificacionFuncional") = ObjClasificacionFuncional.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionFuncional(UsuarioActual.CveEmpresa) = ObjClasificacionFuncional.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjClasificacionFuncional.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
@@ -215,11 +253,11 @@ Partial Class AC_CatClasificacionFuncional
|
||||
#End Region
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs)
|
||||
Tbl.ExportToExcel("Catalogo Clasificacion Funcional")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
|
||||
@@ -11,133 +11,67 @@
|
||||
Catálogo de Clasificación Geográfica
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarClasificacionFuncional" data-toggle="tooltip" data-placement="left" title="Agregar una Clasificación Geografica" Text="<i class='fa fa-plus'></i>Agregar Clasificación Geografica"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="BtnImprimir_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="ImgExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkPdf" />
|
||||
<asp:PostBackTrigger ControlID="LnkExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-hover Widthall">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="243px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbClasificacionGeografica" runat="server" CausesValidation="false" Text="" CommandArgument="ClasificacionGeografica;0" OnClick="LbOrden_Click">
|
||||
Clasificación Geográfica
|
||||
<asp:Literal ID="ImgClasificacionGeografica" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus;0" OnClick="LbOrden_Click">
|
||||
Estatus<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng;0" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario;0" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="118" style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveClasificacionGeografica,ClasificacionGeografica,Estatus,FechaIng,Usuario"
|
||||
EmptyDataText="No se encontraron Clasificación Geográfica Registrados" ToolTip="Listado de ClasificacionGeografica" CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Clasificación Geográfica" DataField="ClasificacionGeografica" DataFormatString="{0}" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--ItemStyle-Width="250px"--%>
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--ItemStyle-Width="100px"--%>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0}" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--ItemStyle-Width="120px"--%>
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--ItemStyle-Width="100px"--%>
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtClasificacionGeografica" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="240px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClasificacionGeografica" runat="server" ControlToValidate="TxtClasificacionGeografica" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación Geográfica''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClasificacionGeografica" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionGeografica" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveClasificacionGeografica" EmptyDataText="No se encontraron Clasificación Geográfica Registrados" ToolTip="Listado de ClasificacionGeografica" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlClasificacionGeografica" runat="server" Text='<%# Eval("ClasificacionGeografica", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtClasificacionGeografica" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("ClasificacionGeografica") %>' ValidationGroup="GrpGV" Width="240px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClasificacionGeografica" runat="server" ControlToValidate="TxtClasificacionGeografica" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación Geográfica''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClasificacionGeografica" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionGeografica" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table runat="server" id="Tbl" style="display:none;">
|
||||
<table runat="server" id="Tbl" style="display: none;">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Clasificación Geográfica" DataField="ClasificacionGeografica" DataFormatString="{0}" ItemStyle-HorizontalAlign="Left"/> <%--ItemStyle-Width="250px"--%>
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" ItemStyle-HorizontalAlign="Left"/> <%--ItemStyle-Width="100px"--%>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0}" ItemStyle-HorizontalAlign="Left"/> <%--ItemStyle-Width="120px"--%>
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-HorizontalAlign="Left"/> <%--ItemStyle-Width="100px"--%>
|
||||
<asp:BoundField HeaderText="Clasificación Geográfica" DataField="ClasificacionGeografica" DataFormatString="{0}" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--ItemStyle-Width="250px"--%>
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--ItemStyle-Width="100px"--%>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0}" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--ItemStyle-Width="120px"--%>
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--ItemStyle-Width="100px"--%>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
@@ -149,6 +83,36 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="DivAgregarClasifFuncional" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Clasificación Geografica</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtClasificacionGeografica" runat="server" CssClass="form-control " CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClasificacionGeografica" runat="server" ControlToValidate="TxtClasificacionGeografica" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación Geográfica''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClasificacionGeografica" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionGeografica" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="TxtClasificacionGeografica">Clasificación Geografica:</label>
|
||||
</div>
|
||||
<div id="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardar" />
|
||||
<%--<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton>--%>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -13,6 +13,14 @@ Imports Microsoft.Reporting.WebForms
|
||||
Partial Class AC_CatClasificacionGeografica
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveClasificacionGeografica() As Integer 'Guardamos el ID de registro para saber cual registro Editar
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveClasificacionGeografica")), -1, CInt(ViewState("CveClasificacionGeografica")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveClasificacionGeografica") = Value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtClasificacionGeografica As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtClasificacionGeografica"), DataTable)
|
||||
@@ -65,24 +73,74 @@ Partial Class AC_CatClasificacionGeografica
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarClasificacionFuncional_Click(sender As Object, e As EventArgs) Handles BtnAgregarClasificacionFuncional.Click
|
||||
TxtClasificacionGeografica.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
CheckActiveSection.Visible = False
|
||||
LbAgregar.Text = "Agregar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarClasifFuncional"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
CveClasificacionGeografica = GvRow.DataKey("CveClasificacionGeografica").ToEntero
|
||||
TxtClasificacionGeografica.Text = GvRow.DataKey("ClasificacionGeografica")
|
||||
CheckActiveSection.Visible = True
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus") = "Activo"
|
||||
LbAgregar.Text = "Actualizar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarClasifFuncional"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjClasificacionGeografica As New ClsAC
|
||||
If ObjClasificacionGeografica.AddClasificacionGeografica(TxtClasificacionGeografica.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtClasificacionGeografica.Text = ""
|
||||
Alert("El Nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTClasificacionGeografica") = ObjClasificacionGeografica.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionGeografica(UsuarioActual.CveEmpresa) = ObjClasificacionGeografica.DtResultados
|
||||
If LbAgregar.Text = "Agregar" Then
|
||||
If ObjClasificacionGeografica.AddClasificacionGeografica(TxtClasificacionGeografica.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtClasificacionGeografica.Text = ""
|
||||
Alert("El Nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
'UpTitulos.Update()
|
||||
ViewState("DTClasificacionGeografica") = ObjClasificacionGeografica.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionGeografica(UsuarioActual.CveEmpresa) = ObjClasificacionGeografica.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
Else
|
||||
If ObjClasificacionGeografica.UpdateClasificacionGeografica(TxtClasificacionGeografica.Text.Trim, ChkEstatus.Checked, CveClasificacionGeografica) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTClasificacionGeografica") = ObjClasificacionGeografica.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionGeografica(UsuarioActual.CveEmpresa) = ObjClasificacionGeografica.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarClasifFuncional"))
|
||||
ObjClasificacionGeografica.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
Dim ObjClasificacionGeografica As New ClsAC
|
||||
If ObjClasificacionGeografica.RemoveClasificacionGeografica(GvRow.DataKey("CveClasificacionGeografica").ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTClasificacionGeografica") = ObjClasificacionGeografica.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_ClasificacionGeografica(UsuarioActual.CveEmpresa) = ObjClasificacionGeografica.DtResultados
|
||||
Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjClasificacionGeografica.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -91,16 +149,16 @@ Partial Class AC_CatClasificacionGeografica
|
||||
e.Row.Cells(1).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(50)
|
||||
'e.Row.Cells(4).Width = Unit.Pixel(50)
|
||||
'e.Row.Cells(5).Width = Unit.Pixel(50)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -215,11 +273,11 @@ Partial Class AC_CatClasificacionGeografica
|
||||
#End Region
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs)
|
||||
Tbl.ExportToExcel("Catalogo Clasificacion Geografica")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
|
||||
@@ -11,117 +11,150 @@
|
||||
Catálogo de Finalidad
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarClasificacionFuncional" data-toggle="tooltip" data-placement="left" title="Agregar una Finalidad" Text="<i class='fa fa-plus'></i>Agregar Finalidad"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-hover Widthall">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="250px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFinalidad" runat="server" CausesValidation="false" Text="" CommandArgument="Finalidad;0" OnClick="LbOrden_Click">
|
||||
Finalidad
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-hover Widthall">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="250px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFinalidad" runat="server" CausesValidation="false" Text="" CommandArgument="Finalidad;0" OnClick="LbOrden_Click">
|
||||
Finalidad
|
||||
<asp:Literal ID="ImgFinalidad" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus;0" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus;0" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFecha" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng;0" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFecha" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng;0" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario;0" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario;0" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="103" style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtFinalidad" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="244px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFinalidad" runat="server" ControlToValidate="TxtFinalidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Finalidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFinalidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVFinalidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFinalidad" EmptyDataText="No se encontraron Finalidad Registrados" ToolTip="Listado de Finalidad" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFinalidad" runat="server" Text='<%# Eval("Finalidad", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtFinalidad" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Finalidad") %>' ValidationGroup="GrpGV" Width="244px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFinalidad" runat="server" ControlToValidate="TxtFinalidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Finalidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFinalidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVFinalidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="103" style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFinalidad" EmptyDataText="No se encontraron Finalidad Registrados" ToolTip="Listado de Finalidad" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFinalidad" runat="server" Text='<%# Eval("Finalidad", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtFinalidad" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Finalidad") %>' ValidationGroup="GrpGV" Width="244px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFinalidad" runat="server" ControlToValidate="TxtFinalidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Finalidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFinalidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVFinalidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivAgregarClasifFuncional" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Clasificación Funcional</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtFinalidad" runat="server" CausesValidation="true" CssClass="form-control " MaxLength="50" ValidationGroup="GrpGuardar" Width="244px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFinalidad" runat="server" ControlToValidate="TxtFinalidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Finalidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFinalidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVFinalidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="TxtFinalidad">Finalidad:</label>
|
||||
</div>
|
||||
<div id="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="Button1" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardar" />
|
||||
<%--<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton>--%>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -52,6 +52,15 @@ Partial Class AC_CatFinalidad
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarClasificacionFuncional_Click(sender As Object, e As EventArgs) Handles BtnAgregarClasificacionFuncional.Click
|
||||
TxtFinalidad.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
CheckActiveSection.Visible = False
|
||||
LbAgregar.Text = "Agregar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarClasifFuncional"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjFinalidad As New ClsAC
|
||||
If ObjFinalidad.AddFinalidad(TxtFinalidad.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
@@ -10,185 +10,49 @@
|
||||
Catálogo de Fuentes de Financiamiento
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnMostrarModal" data-toggle="tooltip" data-placement="left" title="Agregar Fuente de Financiamiente" Text="<i class='fa fa-plus'></i>Agregar Fuente de Financiamiente"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="BtnImprimir_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="ImgExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkPdf" />
|
||||
<asp:PostBackTrigger ControlID="LnkExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width: 1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="82px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbCodigoFuenteFinanciamiento" runat="server" CausesValidation="false" Text="" CommandArgument="CodigoFuenteFinanciamiento;0" OnClick="LbOrden_Click">
|
||||
Código
|
||||
<asp:Literal ID="ImgCodigoFuenteFinanciamiento" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="250px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFuenteFinanciamiento" runat="server" CausesValidation="false" Text="" CommandArgument="FuenteFinanciamiento;0" OnClick="LbOrden_Click">
|
||||
Fuente Financiamiento
|
||||
<asp:Literal ID="ImgFuenteFinanciamiento" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="160px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbNombre" runat="server" CausesValidation="false" Text="" CommandArgument="Nombre;0" OnClick="LbOrden_Click">
|
||||
Clave CONAC
|
||||
<asp:Literal ID="ImgNombre" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<%--<td width="150px"><asp:LinkButton ID="LbFuenteFinanciamiento" runat="server" CausesValidation="false" Text="Dependecias"></asp:LinkButton> <asp:ImageButton ID="ImgFuenteFinanciamientoCONAC" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>--%>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus;0" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFecha" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng;0" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario;0" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="IMgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="119" style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" CausesValidation="true" MaxLength="5" ValidationGroup="GrpGuardar" Width="72px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigo" runat="server" ControlToValidate="TxtCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Codigo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECodigo" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtFuenteFinanciamiento" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="240px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFuenteFinanciamiento" runat="server" ControlToValidate="TxtFuenteFinanciamiento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FuenteFinanciamiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFuenteFinanciamiento" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuenteFinanciamiento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<%-- <td>
|
||||
<asp:TextBox ID="TxtCveFuenteFinanciamientoCONAC" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Width="145px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCveFuenteFinanciamientoCONAC" runat="server" ControlToValidate="TxtCveFuenteFinanciamientoCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCveFuenteFinanciamientoCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVCveFuenteFinanciamientoCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>--%>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlFuenteFinanciamientoCONAC" runat="server" AppendDataBoundItems="true" DataValueField="CveFinanciamientoCONAC" DataTextField="Nombre" ValidationGroup="GrpGuardar" Width="150px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVFuenteFinanciamientoCONAC" runat="server" ControlToValidate="DdlFuenteFinanciamientoCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FuenteFinanciamientoCONAC''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFuenteFinanciamientoCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuenteFinanciamientoCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFuenteFinanciamiento" EmptyDataText="No se encontraron FuentesFinanciamiento Registrados" ToolTip="Listado de FuentesFinanciamiento" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodigoFuenteFinanciamiento" runat="server" Text='<%# Eval("CodigoFuenteFinanciamiento", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" CausesValidation="true" MaxLength="5" Text='<%# Eval("CodigoFuenteFinanciamiento") %>' ValidationGroup="GrpGV" Width="72px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtCodigoFuenteFinanciamiento" runat="server" ControlToValidate="TxtCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FuenteFinanciamiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCTxtCodigoFuenteFinanciamiento" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtCodigoFuenteFinanciamiento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFuenteFinanciamiento" runat="server" Text='<%# Eval("FuenteFinanciamiento", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtFuenteFinanciamiento" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("FuenteFinanciamiento") %>' ValidationGroup="GrpGV" Width="238px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFuenteFinanciamiento" runat="server" ControlToValidate="TxtFuenteFinanciamiento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FuenteFinanciamiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFuenteFinanciamiento" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuenteFinanciamiento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- <asp:TemplateField>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" Width="100%" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFuenteFinanciamiento,CodigoFuenteFinanciamiento,FuenteFinanciamiento,CveFinanciamientoCONAC,Nombre,Estatus,FechaIng,Usuario"
|
||||
EmptyDataText="No se encontraron FuentesFinanciamiento Registrados" ToolTip="Listado de FuentesFinanciamiento" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Código" DataField="CodigoFuenteFinanciamiento" DataFormatString="{0}" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fuente Financiamiento" DataField="FuenteFinanciamiento" DataFormatString="{0}" ItemStyle-Width="250px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Clave CONAC" DataField="Nombre" DataFormatString="{0}" ItemStyle-Width="160" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" DataFormatString="{0}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:d}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveFuenteFinanciamientoCONAC" runat="server" Text='<%# Eval("CveFuenteFinanciamientoCONAC", "{0}")%>'></asp:Literal>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCveFuenteFinanciamientoCONAC" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("CveFuenteFinanciamientoCONAC")%>' ValidationGroup="GrpGV" Width="145px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCveFuenteFinanciamientoCONAC" runat="server" ControlToValidate="TxtCveFuenteFinanciamientoCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCveFuenteFinanciamientoCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVCveFuenteFinanciamientoCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
--%>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFuenteFinanciamientoCONAC" runat="server" Text='<%# Eval("Nombre", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlFuenteFinanciamientoCONAC" runat="server" DataValueField="CveFinanciamientoCONAC" DataTextField="Nombre" Width="150px"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<table runat="server" id="Tbl" style="display: none;">
|
||||
<tr>
|
||||
@@ -199,10 +63,10 @@
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Código" DataField="CodigoFuenteFinanciamiento" DataFormatString="{0}" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fuente Financiamiento" DataField="FuenteFinanciamiento" DataFormatString="{0}" ItemStyle-Width="250px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Clave CONAC" DataField="Nombre" DataFormatString="{0}" ItemStyle-Width="160" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" DataFormatString="{0}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:d}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Clave CONAC" DataField="Nombre" DataFormatString="{0}" ItemStyle-Width="160" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" DataFormatString="{0}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:d}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
@@ -214,6 +78,51 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="DivModal" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Fuente de Financiamiento</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" CausesValidation="true" MaxLength="5" ValidationGroup="GrpGuardar" Width="50%" CssClass="form-control "></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigo" runat="server" ControlToValidate="TxtCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Codigo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECodigo" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="TxtCodigo">Código:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtFuenteFinanciamiento" runat="server" CausesValidation="true" MaxLength="50" CssClass="form-control " ValidationGroup="GrpGuardar" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFuenteFinanciamiento" runat="server" ControlToValidate="TxtFuenteFinanciamiento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FuenteFinanciamiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFuenteFinanciamiento" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuenteFinanciamiento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="TxtFuenteFinanciamiento">Fuente de Financiamiento:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="DdlFuenteFinanciamientoCONAC">Fuente de Financiamiento CONAC:</label></br>
|
||||
<asp:DropDownList ID="DdlFuenteFinanciamientoCONAC" runat="server" AppendDataBoundItems="true" DataValueField="CveFinanciamientoCONAC" DataTextField="Nombre" CssClass="select2me" ValidationGroup="GrpGuardar" Width="50%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVFuenteFinanciamientoCONAC" runat="server" ControlToValidate="DdlFuenteFinanciamientoCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FuenteFinanciamientoCONAC''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFuenteFinanciamientoCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuenteFinanciamientoCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div id="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardar" />
|
||||
<%--<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton>--%>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
@@ -8,6 +8,16 @@ Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_CatFuentesFinanciamiento
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveFuenteFinanciamiento() As Integer 'Guardamos el ID de registro para saber cual registro Editar
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveFuenteFinanciamiento")), -1, CInt(ViewState("CveFuenteFinanciamiento")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveFuenteFinanciamiento") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtFuentesFinanciamiento As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtFuentesFinanciamiento"), DataTable)
|
||||
@@ -25,6 +35,17 @@ Partial Class AC_CatFuentesFinanciamiento
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnMostrarModal_Click(sender As Object, e As EventArgs) Handles BtnMostrarModal.Click
|
||||
TxtCodigo.Text = ""
|
||||
TxtFuenteFinanciamiento.Text = ""
|
||||
DdlFuenteFinanciamientoCONAC.SelectedValue = "-1"
|
||||
CheckActiveSection.Visible = False
|
||||
ChkEstatus.Checked = True
|
||||
LbAgregar.Text = "Agregar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModal"))
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjFuentesFinanciamiento As New ClsAC
|
||||
If ObjFuentesFinanciamiento.GetFuentesFinanciamiento() Then
|
||||
@@ -45,23 +66,63 @@ Partial Class AC_CatFuentesFinanciamiento
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjFuentesFinanciamiento As New ClsAC
|
||||
If ObjFuentesFinanciamiento.AddFuenteFinanciamiento(TxtCodigo.Text.Trim, TxtFuenteFinanciamiento.Text.Trim, DdlFuenteFinanciamientoCONAC.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtFuenteFinanciamiento.Text = ""
|
||||
'TxtFuenteFinanciamientoCONAC.Text = ""
|
||||
Alert("El Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTFuentesFinanciamiento") = ObjFuentesFinanciamiento.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_FuentesFinanciamiento(-1) = ObjFuentesFinanciamiento.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
If LbAgregar.Text = "Agregar" Then
|
||||
If ObjFuentesFinanciamiento.AddFuenteFinanciamiento(TxtCodigo.Text.Trim, TxtFuenteFinanciamiento.Text.Trim, DdlFuenteFinanciamientoCONAC.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtFuenteFinanciamiento.Text = ""
|
||||
'TxtFuenteFinanciamientoCONAC.Text = ""
|
||||
Alert("El Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
'UpTitulos.Update()
|
||||
ViewState("DTFuentesFinanciamiento") = ObjFuentesFinanciamiento.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_FuentesFinanciamiento(-1) = ObjFuentesFinanciamiento.DtResultados
|
||||
End If
|
||||
Else
|
||||
If ObjFuentesFinanciamiento.UpdateFuenteFinanciamiento(TxtCodigo.Text, TxtFuenteFinanciamiento.Text, DdlFuenteFinanciamientoCONAC.SelectedValue.ToEntero, ChkEstatus.Checked, CveFuenteFinanciamiento) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFuentesFinanciamiento") = ObjFuentesFinanciamiento.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_FuentesFinanciamiento(-1) = ObjFuentesFinanciamiento.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivModal"))
|
||||
ObjFuentesFinanciamiento.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
CveFuenteFinanciamiento = GvRow.DataKey("CveFuenteFinanciamiento").ToEntero
|
||||
TxtCodigo.Text = GvRow.DataKey("CodigoFuenteFinanciamiento")
|
||||
TxtFuenteFinanciamiento.Text = GvRow.DataKey("FuenteFinanciamiento")
|
||||
DdlFuenteFinanciamientoCONAC.SelectedValue = GvRow.DataKey("CveFinanciamientoCONAC")
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus") = "Activo"
|
||||
LbAgregar.Text = "Actualizar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModal"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
Dim ObjFuentesFinanciamiento As New ClsAC
|
||||
If ObjFuentesFinanciamiento.RemoveFuenteFinanciamiento(GvRow.DataKey("CveFuenteFinanciamiento").ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFuentesFinanciamiento") = ObjFuentesFinanciamiento.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_FuentesFinanciamiento(-1) = ObjFuentesFinanciamiento.DtResultados
|
||||
Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjFuentesFinanciamiento.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaFuenteFinanciamientoCONAC()
|
||||
DdlFuenteFinanciamientoCONAC.DataSource = GlobalDTAC_FuentesFinanciamientoCONAC
|
||||
DdlFuenteFinanciamientoCONAC.DataBind()
|
||||
@@ -77,8 +138,8 @@ Partial Class AC_CatFuentesFinanciamiento
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(7).Width = Unit.Pixel(50)
|
||||
'e.Row.Cells(6).Width = Unit.Pixel(50)
|
||||
'e.Row.Cells(7).Width = Unit.Pixel(50)
|
||||
'e.Row.Cells(7).Width = Unit.Pixel(50)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
||||
@@ -87,8 +148,8 @@ Partial Class AC_CatFuentesFinanciamiento
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
|
||||
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCDropDownList("DdlFuenteFinanciamientoCONAC").DataSource = GlobalDTAC_FuentesFinanciamientoCONAC
|
||||
@@ -206,17 +267,17 @@ Partial Class AC_CatFuentesFinanciamiento
|
||||
|
||||
GvDatos.DataBind()
|
||||
Gv.DataBind()
|
||||
UpDatos.Update()
|
||||
'UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs)
|
||||
Tbl.ExportToExcel("Catalogo de Fuentes de Financiamiento")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
|
||||
@@ -10,142 +10,81 @@
|
||||
Catálogo de Fuente de Financiamiento
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnMostrarModal" data-toggle="tooltip" data-placement="left" title="Agregar Fuente de Financiamiente CONAC" Text="<i class='fa fa-plus'></i>Agregar Fuente de Financiamiente CONAC"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="BtnImprimir_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="ImgExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkPdf" />
|
||||
<asp:PostBackTrigger ControlID="LnkExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width:1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="65px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbClaveFinanciamientoCONAC" runat="server" CausesValidation="false" Text="" CommandArgument="ClaveFinanciamientoCONAC;0" OnClick="LbOrden_Click">
|
||||
Clave <asp:Literal ID="ImgClaveFinanciamientoCONAC" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="250px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbNombre" runat="server" CausesValidation="false" Text="" CommandArgument="Nombre;0" OnClick="LbOrden_Click">
|
||||
Nombre <asp:Literal ID="ImgNombre" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus;0" OnClick="LbOrden_Click">
|
||||
Estatus <asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFecha" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng;0" OnClick="LbOrden_Click">
|
||||
Fecha <asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario;0" OnClick="LbOrden_Click">
|
||||
Usuario <asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="118" style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<%--<div class="portlet box blue-hoki" style="width: 1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="65px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbClaveFinanciamientoCONAC" runat="server" CausesValidation="false" Text="" CommandArgument="ClaveFinanciamientoCONAC;0" OnClick="LbOrden_Click">
|
||||
Clave
|
||||
<asp:Literal ID="ImgClaveFinanciamientoCONAC" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="250px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbNombre" runat="server" CausesValidation="false" Text="" CommandArgument="Nombre;0" OnClick="LbOrden_Click">
|
||||
Nombre
|
||||
<asp:Literal ID="ImgNombre" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus;0" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFecha" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng;0" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario;0" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="118" style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr>
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<asp:TextBox ID="TxtClaveFinanciamientoCONAC" runat="server" CausesValidation="true" MaxLength="2" ValidationGroup="GrpGuardar" Width="55px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClaveFinanciamientoCONAC" runat="server" ControlToValidate="TxtClaveFinanciamientoCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ClaveFinanciamientoCONAC''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClaveFinanciamientoCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVClaveFinanciamientoCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtNombre" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="240px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNombre" runat="server" ControlToValidate="TxtNombre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCNombre" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFinanciamientoCONAC" EmptyDataText="No se encontraron Fuente de Financiamiento Registrados" ToolTip="Listado de Fuente de Financiamiento" CssClass="table table-striped table-advance table-hover" style="margin-top:-10px;" GridLines="None" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlClaveFinanciamientoCONAC" runat="server" Text='<%# Eval("ClaveFinanciamientoCONAC", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtClaveFinanciamientoCONAC" runat="server" CausesValidation="true" MaxLength="2" Text='<%# Eval("ClaveFinanciamientoCONAC")%>' ValidationGroup="GrpGV" Width="55px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClaveFinanciamientoCONAC" runat="server" ControlToValidate="TxtClaveFinanciamientoCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fuente de Financiamiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClaveFinanciamientoCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVClaveFinanciamientoCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtNombre" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Nombre")%>' ValidationGroup="GrpGV" Width="240px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNombre" runat="server" ControlToValidate="TxtNombre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fuente de Financiamiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCNombre" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<%--<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<table runat="server" id="Tbl" style="display: none;">
|
||||
<tr>
|
||||
@@ -155,10 +94,10 @@
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Clave" DataField="ClaveFinanciamientoCONAC" DataFormatString="{0}" ItemStyle-Width="65" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" DataFormatString="{0}" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" DataFormatString="{0}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:d}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" DataFormatString="{0}" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" DataFormatString="{0}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:d}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
@@ -170,6 +109,66 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" Width="100%" AutoGenerateColumns="False" DataKeyNames="CveFinanciamientoCONAC,ClaveFinanciamientoCONAC,Nombre,Estatus,FechaIng,Usuario"
|
||||
EmptyDataText="No se encontraron Fuente de Financiamiento Registrados" ToolTip="Listado de Fuente de Financiamiento" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Clave" DataField="ClaveFinanciamientoCONAC" DataFormatString="{0}" ItemStyle-Width="65" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" DataFormatString="{0}" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" DataFormatString="{0}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:d}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DivModal" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Fuente de Financiamiento</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtClaveFinanciamientoCONAC" runat="server" CssClass="form-control " CausesValidation="true" MaxLength="2" ValidationGroup="GrpGuardar" Width="50%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClaveFinanciamientoCONAC" runat="server" ControlToValidate="TxtClaveFinanciamientoCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ClaveFinanciamientoCONAC''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCClaveFinanciamientoCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVClaveFinanciamientoCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="TxtClaveFinanciamientoCONAC">Clave:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombre" runat="server" CausesValidation="true" CssClass="form-control " MaxLength="50" ValidationGroup="GrpGuardar" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNombre" runat="server" ControlToValidate="TxtNombre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCNombre" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombre" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="TxtNombre">Nombre:</label>
|
||||
</div>
|
||||
<div id="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardar" />
|
||||
<%--<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton>--%>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
@@ -9,6 +9,15 @@ Imports Microsoft.Reporting.WebForms
|
||||
Partial Class AC_CatFuentesFinanciamientoCONAC
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveFinanciamientoCONAC() As Integer 'Guardamos el ID de registro para saber cual registro Editar
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveFinanciamientoCONAC")), -1, CInt(ViewState("CveFinanciamientoCONAC")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveFinanciamientoCONAC") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtFuentesFinanciamientoCONAC As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtFuentesFinanciamientoCONAC"), DataTable)
|
||||
@@ -61,22 +70,73 @@ Partial Class AC_CatFuentesFinanciamientoCONAC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Protected Sub BtnMostrarModal_Click(sender As Object, e As EventArgs) Handles BtnMostrarModal.Click
|
||||
TxtClaveFinanciamientoCONAC.Text = ""
|
||||
TxtNombre.Text = ""
|
||||
CheckActiveSection.Visible = False
|
||||
ChkEstatus.Checked = True
|
||||
LbAgregar.Text = "Agregar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModal"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
CveFinanciamientoCONAC = GvRow.DataKey("CveFinanciamientoCONAC").ToEntero
|
||||
TxtClaveFinanciamientoCONAC.Text = GvRow.DataKey("ClaveFinanciamientoCONAC")
|
||||
TxtNombre.Text = GvRow.DataKey("Nombre")
|
||||
CheckActiveSection.Visible = True
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus") = "Activo"
|
||||
LbAgregar.Text = "Actualizar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModal"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
Dim ObjFuentesFinanciamientoCONAC As New ClsAC
|
||||
If ObjFuentesFinanciamientoCONAC.AddFuenteFinanciamientoCONAC(TxtClaveFinanciamientoCONAC.Text.Trim, TxtNombre.Text.Trim, UsuarioActual.CveUsuario) Then
|
||||
TxtNombre.Text = ""
|
||||
TxtClaveFinanciamientoCONAC.Text = ""
|
||||
Alert("El Nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
If ObjFuentesFinanciamientoCONAC.RemoveFuenteFinanciamientoCONAC(GvRow.DataKey("CveFinanciamientoCONAC").ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFuentesFinanciamientoCONAC") = ObjFuentesFinanciamientoCONAC.DtResultados
|
||||
GlobalDTAC_FuentesFinanciamientoCONAC = ObjFuentesFinanciamientoCONAC.DtResultados
|
||||
Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
ObjFuentesFinanciamientoCONAC.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjFuentesFinanciamientoCONAC As New ClsAC
|
||||
If LbAgregar.Text = "Agregar" Then
|
||||
If ObjFuentesFinanciamientoCONAC.AddFuenteFinanciamientoCONAC(TxtClaveFinanciamientoCONAC.Text.Trim, TxtNombre.Text.Trim, UsuarioActual.CveUsuario) Then
|
||||
TxtNombre.Text = ""
|
||||
TxtClaveFinanciamientoCONAC.Text = ""
|
||||
Alert("El Nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
'UpTitulos.Update()
|
||||
ViewState("DTFuentesFinanciamientoCONAC") = ObjFuentesFinanciamientoCONAC.DtResultados
|
||||
GlobalDTAC_FuentesFinanciamientoCONAC = ObjFuentesFinanciamientoCONAC.DtResultados
|
||||
|
||||
End If
|
||||
Else
|
||||
If ObjFuentesFinanciamientoCONAC.UpdateFuenteFinanciamientoCONAC(TxtClaveFinanciamientoCONAC.Text.Trim, TxtNombre.Text.Trim, ChkEstatus.Checked, CveFinanciamientoCONAC) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFuentesFinanciamientoCONAC") = ObjFuentesFinanciamientoCONAC.DtResultados
|
||||
GlobalDTAC_FuentesFinanciamientoCONAC = ObjFuentesFinanciamientoCONAC.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivModal"))
|
||||
ObjFuentesFinanciamientoCONAC.Dispose()
|
||||
End Sub
|
||||
|
||||
@@ -89,16 +149,16 @@ Partial Class AC_CatFuentesFinanciamientoCONAC
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(50)
|
||||
'e.Row.Cells(5).Width = Unit.Pixel(50)
|
||||
'e.Row.Cells(6).Width = Unit.Pixel(50)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -211,11 +271,11 @@ Partial Class AC_CatFuentesFinanciamientoCONAC
|
||||
#End Region
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs)
|
||||
Tbl.ExportToExcel("Catalogo de Fuente de Financiamiento ")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
|
||||
@@ -10,15 +10,26 @@
|
||||
Catálogo de Fuentes de Recaudación
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="H" runat="Server">
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnMostrarModal" data-toggle="tooltip" data-placement="left" title="Agregar Fuente de Financiamiente" Text="<i class='fa fa-plus'></i>Agregar Fuente de Financiamiente"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="BtnImprimir_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="ImgExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkPdf" />
|
||||
<asp:PostBackTrigger ControlID="LnkExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width: 1000px;">
|
||||
<%--<div class="portlet box blue-hoki" style="width: 1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -53,81 +64,39 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtFuenteRecaudacion" runat="server" CausesValidation="true" MaxLength="100" ValidationGroup="GrpGuardar" Width="338px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFuenteRecaudacion" runat="server" ControlToValidate="TxtFuenteRecaudacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FuenteRecaudacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFuenteRecaudacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuenteRecaudacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
<%--<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton>--</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFuenteRecaudacion" EmptyDataText="No se encontraron Fuente de Recaudacións Registrados" ToolTip="Listado de FuenteRecaudacion" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFuenteRecaudacion" runat="server" Text='<%# Eval("FuenteRecaudacion", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtFuenteRecaudacion" runat="server" CausesValidation="true" MaxLength="100" Text='<%# Eval("FuenteRecaudacion") %>' ValidationGroup="GrpGV" Width="338px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFuenteRecaudacion" runat="server" ControlToValidate="TxtFuenteRecaudacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FuenteRecaudacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFuenteRecaudacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuenteRecaudacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" Width="100%" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFuenteRecaudacion,FuenteRecaudacion,Estatus,FechaIng,Usuario"
|
||||
EmptyDataText="No se encontraron Fuente de Recaudacións Registrados" ToolTip="Listado de FuenteRecaudacion" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fuente de Recaudación" DataField="FuenteRecaudacion" DataFormatString="{0}" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" DataFormatString="{0}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:d}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<table runat="server" id="Tbl" style="display: none;">
|
||||
<tr>
|
||||
@@ -151,6 +120,36 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="DivModal" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Fuentes de Recaudación</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtFuenteRecaudacion" runat="server" CausesValidation="true" MaxLength="100" ValidationGroup="GrpGuardar" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFuenteRecaudacion" runat="server" ControlToValidate="TxtFuenteRecaudacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FuenteRecaudacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFuenteRecaudacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVFuenteRecaudacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="TxtFuenteRecaudacion">Fuente de Recaudación:</label>
|
||||
</div>
|
||||
<div id="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content10" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
@@ -8,6 +8,14 @@ Imports Microsoft.Reporting.WebForms
|
||||
Partial Class AC_CatFuentesRecaudacion
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveFuenteRecaudacion() As Integer 'Guardamos el ID de registro para saber cual registro Editar
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveFuenteRecaudacion")), -1, CInt(ViewState("CveFuenteRecaudacion")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveFuenteRecaudacion") = Value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtFuentesRecaudacion As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtFuentesRecaudacion"), DataTable)
|
||||
@@ -30,6 +38,15 @@ Partial Class AC_CatFuentesRecaudacion
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnMostrarModal_Click(sender As Object, e As EventArgs) Handles BtnMostrarModal.Click
|
||||
TxtFuenteRecaudacion.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
CheckActiveSection.Visible = False
|
||||
LbAgregar.Text = "Agregar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModal"))
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjFuenteRecaudacion As New ClsAC
|
||||
If ObjFuenteRecaudacion.GetFuentesRecaudacion() Then
|
||||
@@ -50,19 +67,29 @@ Partial Class AC_CatFuentesRecaudacion
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjFuenteRecaudacion As New ClsAC
|
||||
If ObjFuenteRecaudacion.AddFuentesRecaudacion(TxtFuenteRecaudacion.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtFuenteRecaudacion.Text = ""
|
||||
Alert("La nueva Fuente de Recaudacion se guardo correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTFuenteRecaudacion") = ObjFuenteRecaudacion.DtResultados.FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa))
|
||||
GlobalDTAC_FuentesRecaudacion(-1) = ObjFuenteRecaudacion.DtResultados
|
||||
If LbAgregar.Text = "Agregar" Then
|
||||
If ObjFuenteRecaudacion.AddFuentesRecaudacion(TxtFuenteRecaudacion.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtFuenteRecaudacion.Text = ""
|
||||
Alert("La nueva Fuente de Recaudacion se guardo correctamente.", TipoMensaje.MsgInformacion)
|
||||
'UpTitulos.Update()
|
||||
ViewState("DTFuenteRecaudacion") = ObjFuenteRecaudacion.DtResultados.FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa))
|
||||
GlobalDTAC_FuentesRecaudacion(-1) = ObjFuenteRecaudacion.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
Else
|
||||
If ObjFuenteRecaudacion.UpdateFuentesRecaudacion(TxtFuenteRecaudacion.Text, ChkEstatus.Checked, CveFuenteRecaudacion) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFuenteRecaudacion") = ObjFuenteRecaudacion.DtResultados.FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa))
|
||||
GlobalDTAC_FuentesRecaudacion(-1) = ObjFuenteRecaudacion.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivModal"))
|
||||
ObjFuenteRecaudacion.Dispose()
|
||||
End Sub
|
||||
|
||||
@@ -74,15 +101,15 @@ Partial Class AC_CatFuentesRecaudacion
|
||||
e.Row.Cells(1).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(50)
|
||||
'e.Row.Cells(4).Width = Unit.Pixel(50)
|
||||
'e.Row.Cells(5).Width = Unit.Pixel(50)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -147,6 +174,35 @@ Partial Class AC_CatFuentesRecaudacion
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
CveFuenteRecaudacion = GvRow.DataKey("CveFuenteRecaudacion").ToEntero
|
||||
TxtFuenteRecaudacion.Text = GvRow.DataKey("FuenteRecaudacion")
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus") = "Activo"
|
||||
LbAgregar.Text = "Actualizar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModal"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
Dim ObjFuenteRecaudacion As New ClsAC
|
||||
If ObjFuenteRecaudacion.RemoveFuentesRecaudacion(GvRow.DataKey("CveFuenteRecaudacion").ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTFuenteRecaudacion") = ObjFuenteRecaudacion.DtResultados.FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa))
|
||||
GlobalDTAC_FuentesRecaudacion(-1) = ObjFuenteRecaudacion.DtResultados
|
||||
Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjFuenteRecaudacion.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
@@ -196,11 +252,11 @@ Partial Class AC_CatFuentesRecaudacion
|
||||
#End Region
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs)
|
||||
Tbl.ExportToExcel("Catalogo de Fuentes de Recaudacion ")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||
ImprimiReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
|
||||
@@ -10,171 +10,49 @@
|
||||
Catálogo de Clasificaciones de Objeto de Gasto
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>--%>
|
||||
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
|
||||
<asp:ImageButton ID="BtnImprimir" OnClick="BtnImprimir_Click" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" />
|
||||
--%>
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnMostrarModal" data-toggle="tooltip" data-placement="left" title="Agregar Fuente de Financiamiente" Text="<i class='fa fa-plus'></i>Agregar Fuente de Financiamiente"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="BtnImprimir_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="ImgExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkPdf" />
|
||||
<asp:PostBackTrigger ControlID="LnkExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width: 1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="75px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbCodigo" runat="server" CausesValidation="false" Text="" CommandArgument="Codigo" OnClick="LbOrden_Click">
|
||||
Código
|
||||
<asp:Literal ID="ImgCodigo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="406px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbClasificacion" runat="server" CausesValidation="false" Text="" CommandArgument="Clasificacion" OnClick="LbOrden_Click">
|
||||
Clasificación
|
||||
<asp:Literal ID="ImgClasificacion" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="90px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbAfectable" runat="server" CausesValidation="false" Text="" CommandArgument="Afectable" OnClick="LbOrden_Click">
|
||||
Afectable
|
||||
<asp:Literal ID="ImgbAfectable" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbFecha" runat="server" CausesValidation="false" Text="" CommandArgument="Fecha" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFecha" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px" style="text-align: center">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="119" style="text-align: center">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Width="65px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigo" runat="server" ControlToValidate="TxtCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCodigo" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtOGClasificacion" runat="server" CausesValidation="true" MaxLength="100" ValidationGroup="GrpGuardar" Width="395px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOGClasificacion" runat="server" ControlToValidate="TxtOGClasificacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''OGClasificacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOGClasificacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVOGClasificacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveClasificacion" EmptyDataText="No se encontraron Clasificaciones de Objeto de Gasto Registradas" ToolTip="Listado de Clasificaciones de Objeto de Gasto" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Codigo")%>' ValidationGroup="GrpGV" Width="65px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigo" runat="server" ControlToValidate="TxtCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCodigo" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlOGClasificacion" runat="server" Text='<%# Eval("Clasificacion", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtOGClasificacion" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Clasificacion") %>' ValidationGroup="GrpGV" Width="395px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOGClasificacion" runat="server" ControlToValidate="TxtOGClasificacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''OGClasificacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOGClasificacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVOGClasificacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAfectable" runat="server" Text='<%# Eval("Afectable")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkAfectable" runat="server" Checked='<%# If (Eval("Afectable").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%" DataKeyNames="CveClasificacion,Codigo,Clasificacion,Afectable,Estatus,Fecha,Usuario"
|
||||
EmptyDataText="No se encontraron Clasificaciones de Objeto de Gasto Registradas" ToolTip="Listado de Clasificaciones de Objeto de Gasto"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" DataFormatString="{0}" ItemStyle-Width="75" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Clasificación" DataField="Clasificacion" DataFormatString="{0}" ItemStyle-Width="410" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Afectable" DataField="TextoAfectable" DataFormatString="{0}" ItemStyle-Width="90" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" DataFormatString="{0}" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<table runat="server" id="Tbl" style="display: none;">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -199,6 +77,47 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="DivModal" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Clasificaciones de Objeto de Gasto</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Width="50%" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigo" runat="server" ControlToValidate="TxtCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCodigo" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="TxtCodigo">Código:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtOGClasificacion" runat="server" CausesValidation="true" MaxLength="100" ValidationGroup="GrpGuardar" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOGClasificacion" runat="server" ControlToValidate="TxtOGClasificacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''OGClasificacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOGClasificacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVOGClasificacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="TxtOGClasificacion">Clasificación:</label>
|
||||
</div>
|
||||
<div id="DivAfectable" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<label for="ChkEstatus">Afectable:</label>
|
||||
<asp:CheckBox ID="ChkAfectable" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
<div id="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
@@ -9,6 +9,15 @@ Imports Microsoft.Reporting.WebForms
|
||||
Partial Class AC_CatOGClasificaciones
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveClasificacion() As Integer 'Guardamos el ID de registro para saber cual registro Editar
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveClasificacion")), -1, CInt(ViewState("CveClasificacion")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveClasificacion") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtOGClasificaciones As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtOGClasificaciones"), DataTable)
|
||||
@@ -25,6 +34,17 @@ Partial Class AC_CatOGClasificaciones
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnMostrarModal_Click(sender As Object, e As EventArgs) Handles BtnMostrarModal.Click
|
||||
TxtCodigo.Text = ""
|
||||
TxtOGClasificacion.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
CheckActiveSection.Visible = False
|
||||
DivAfectable.Visible = False
|
||||
LbAgregar.Text = "Agregar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModal"))
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.GetClasificaciones() Then
|
||||
@@ -45,24 +65,67 @@ Partial Class AC_CatOGClasificaciones
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.AddClasificaciones(TxtOGClasificacion.Text.Trim, TxtCodigo.Text.Trim, -1, "", -1, "", -1, "", 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtOGClasificacion.Text = ""
|
||||
TxtCodigo.Text = ""
|
||||
Alert("La Clasificacion de Objeto de Gasto se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTOGClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTClasificaciones = ObjClasificaciones.DtResultados
|
||||
If LbAgregar.Text = "Agregar" Then
|
||||
If ObjClasificaciones.AddClasificaciones(TxtOGClasificacion.Text.Trim, TxtCodigo.Text.Trim, -1, "", -1, "", -1, "", 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtOGClasificacion.Text = ""
|
||||
TxtCodigo.Text = ""
|
||||
Alert("La Clasificacion de Objeto de Gasto se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
'UpTitulos.Update()
|
||||
ViewState("DTOGClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTClasificaciones = ObjClasificaciones.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
Else
|
||||
If ObjClasificaciones.UpdateClasificacion(TxtOGClasificacion.Text, TxtCodigo.Text, -1, "", -1, "", -1, "", ChkEstatus.Checked, ChkAfectable.Checked, 0, UsuarioActual.CveUsuario, CveClasificacion) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTOGClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTClasificaciones = ObjClasificaciones.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivModal"))
|
||||
ObjClasificaciones.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
CveClasificacion = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
TxtCodigo.Text = GvRow.DataKey("Codigo")
|
||||
TxtOGClasificacion.Text = GvRow.DataKey("Clasificacion")
|
||||
ChkAfectable.Checked = GvRow.DataKey("Afectable") = "True"
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus") = "Activo"
|
||||
DivAfectable.Visible = True
|
||||
CheckActiveSection.Visible = True
|
||||
LbAgregar.Text = "Actualizar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModal"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.RemoveClasificacion(GvRow.DataKey("CveClasificacion").ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTOGClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTClasificaciones = ObjClasificaciones.DtResultados
|
||||
Alert("la Clasificacion de Objeto de Gasto se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjClasificaciones.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(75)
|
||||
@@ -71,8 +134,8 @@ Partial Class AC_CatOGClasificaciones
|
||||
e.Row.Cells(3).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(7).Width = Unit.Pixel(50)
|
||||
'e.Row.Cells(6).Width = Unit.Pixel(50)
|
||||
'e.Row.Cells(7).Width = Unit.Pixel(50)
|
||||
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
||||
@@ -80,8 +143,8 @@ Partial Class AC_CatOGClasificaciones
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -193,11 +256,11 @@ Partial Class AC_CatOGClasificaciones
|
||||
#End Region
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs)
|
||||
Tbl.ExportToExcel("Catalogo de Clasificaciones de Objeto de Gasto ")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As ImageClickEventArgs)
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPrograma.aspx.vb" Inherits="AC_CatPrograma" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
@@ -9,146 +10,144 @@
|
||||
Catálogo de Programa
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnMostrarModal" data-toggle="tooltip" data-placement="left" title="Agregar Fuente de Financiamiente" Text="<i class='fa fa-plus'></i>Agregar Fuente de Financiamiente"></asp:LinkButton>
|
||||
</li>
|
||||
<%--<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="BtnImprimir_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="ImgExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>--%>
|
||||
</ContentTemplate>
|
||||
<%--<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkPdf" />
|
||||
<asp:PostBackTrigger ControlID="LnkExcel" />
|
||||
</Triggers>--%>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="portlet box blue-hoki" style="width:1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="250px">
|
||||
<asp:LinkButton ID="LbPrograma" runat="server" CausesValidation="false" Text="" CommandArgument="Programa" OnClick="LbOrden_Click">
|
||||
Programa
|
||||
<%--<div class="portlet box blue-hoki" style="width: 1000px;">
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="250px">
|
||||
<asp:LinkButton ID="LbPrograma" runat="server" CausesValidation="false" Text="" CommandArgument="Programa" OnClick="LbOrden_Click">
|
||||
Programa
|
||||
<asp:Literal ID="ImgPrograma" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="150px">
|
||||
<asp:LinkButton ID="LbProgramaCONAC" runat="server" CausesValidation="false" Text="" CommandArgument="ProgramaCONAC" OnClick="LbOrden_Click">
|
||||
Programa CONAC
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="150px">
|
||||
<asp:LinkButton ID="LbProgramaCONAC" runat="server" CausesValidation="false" Text="" CommandArgument="ProgramaCONAC" OnClick="LbOrden_Click">
|
||||
Programa CONAC
|
||||
<asp:Literal ID="ImgProgramaCONAC" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="121px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtPrograma" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="244px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPrograma" runat="server" ControlToValidate="TxtPrograma" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Programa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCPrograma" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrograma" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="121px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlProgramaCONAC" runat="server" AppendDataBoundItems="true" DataValueField="CveProgramaCONAC" DataTextField="ProgramaCONAC" ValidationGroup="GrpGuardar" Width="150px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProgramaCONAC" runat="server" ControlToValidate="DdlProgramaCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ProgramaCONAC''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOProgramaCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVProgramaCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<td></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<%--<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton>--%</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>--%>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePrograma" EmptyDataText="No se encontraron Programa Registrados" ToolTip="Listado de Programa" CssClass="table table-striped table-advance table-hover" style="margin-top:-10px;" >
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%" DataKeyNames="CvePrograma,Programa,CveProgramaCONAC,ProgramaCONAC,Estatus,FechaIng,Usuario"
|
||||
EmptyDataText="No se encontraron Programa Registrados" ToolTip="Listado de Programa" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Programa" DataField="Programa" DataFormatString="{0}" ItemStyle-Width="75" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="ProgramaCONAC" DataField="ProgramaCONAC" DataFormatString="{0}" ItemStyle-Width="410" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" DataFormatString="{0}" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:d}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPrograma" runat="server" Text='<%# Eval("Programa", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtPrograma" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Programa")%>' ValidationGroup="GrpGV" Width="244px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPrograma" runat="server" ControlToValidate="TxtPrograma" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Programa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCPrograma" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrograma" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlProgramaCONAC" runat="server" Text='<%# Eval("ProgramaCONAC", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlProgramaCONAC" runat="server" DataValueField="CveProgramaCONAC" DataTextField="ProgramaCONAC" Width="150px"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>"/>
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="DivModal" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Programa</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPrograma" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPrograma" runat="server" ControlToValidate="TxtPrograma" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Programa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCPrograma" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrograma" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="TxtPrograma">Programa:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="DdlProgramaCONAC">Programa CONAC:</label>
|
||||
<asp:DropDownList ID="DdlProgramaCONAC" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveProgramaCONAC" DataTextField="ProgramaCONAC" ValidationGroup="GrpGuardar" CssClass="select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProgramaCONAC" runat="server" ControlToValidate="DdlProgramaCONAC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ProgramaCONAC''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOProgramaCONAC" runat="server" HighlightCssClass="vco" TargetControlID="RFVProgramaCONAC" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div id="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
<%--<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el Programa?');
|
||||
}
|
||||
</script>
|
||||
</script>--%>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -8,6 +8,15 @@ Imports Extensiones
|
||||
Partial Class AC_CatPrograma
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CvePrograma() As Integer 'Guardamos el ID de registro para saber cual registro Editar
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CvePrograma")), -1, CInt(ViewState("CvePrograma")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CvePrograma") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
@@ -34,22 +43,43 @@ Partial Class AC_CatPrograma
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnMostrarModal_Click(sender As Object, e As EventArgs) Handles BtnMostrarModal.Click
|
||||
TxtPrograma.Text = ""
|
||||
DdlProgramaCONAC.SelectedValue = "-1"
|
||||
ChkEstatus.Checked = True
|
||||
CheckActiveSection.Visible = False
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModal"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjPrograma As New ClsAC
|
||||
If ObjPrograma.AddPrograma(TxtPrograma.Text.Trim, DdlProgramaCONAC.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtPrograma.Text = ""
|
||||
|
||||
Alert("El Programa se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTProgramas") = ObjPrograma.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Programas = ObjPrograma.DtResultados
|
||||
If LbAgregar.Text = "Agregar" Then
|
||||
If ObjPrograma.AddPrograma(TxtPrograma.Text.Trim, DdlProgramaCONAC.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtPrograma.Text = ""
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
Alert("El Programa se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
'UpTitulos.Update()
|
||||
ViewState("DTProgramas") = ObjPrograma.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Programas = ObjPrograma.DtResultados
|
||||
|
||||
End If
|
||||
Else
|
||||
If ObjPrograma.UpdatePrograma(TxtPrograma.Text, DdlProgramaCONAC.SelectedValue.ToEntero, ChkEstatus.Checked, CvePrograma) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTProgramas") = ObjPrograma.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Programas = ObjPrograma.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivModal"))
|
||||
ObjPrograma.Dispose()
|
||||
End Sub
|
||||
|
||||
@@ -59,24 +89,56 @@ Partial Class AC_CatPrograma
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
|
||||
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
CvePrograma = GvRow.DataKey("CvePrograma").ToEntero
|
||||
TxtPrograma.Text = GvRow.DataKey("Programa")
|
||||
DdlProgramaCONAC.SelectedValue = GvRow.DataKey("CveProgramaCONAC")
|
||||
CheckActiveSection.Visible = True
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus") = "Activo"
|
||||
LbAgregar.Text = "Actualizar"
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModal"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
Dim ObjPrograma As New ClsAC
|
||||
If ObjPrograma.RemovePrograma(GvRow.DataKey("CvePrograma").ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTProgramas") = ObjPrograma.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAC_Programas = ObjPrograma.DtResultados
|
||||
Alert("El Registro se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjPrograma.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(250)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(53)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(68)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
'If e.Row.RowIndex = 0 Then
|
||||
' e.Row.Cells(0).Width = Unit.Pixel(250)
|
||||
' e.Row.Cells(1).Width = Unit.Pixel(150)
|
||||
' e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
' e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
' e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
' e.Row.Cells(5).Width = Unit.Pixel(53)
|
||||
' e.Row.Cells(6).Width = Unit.Pixel(68)
|
||||
'End If
|
||||
'e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCDropDownList("DdlProgramaCONAC").DataSource = GlobalDTAC_ProgramasCONAC
|
||||
e.Row.FCDropDownList("DdlProgramaCONAC").DataBind()
|
||||
e.Row.FCDropDownList("DdlProgramaCONAC").SelectedValue = e.Row.DBCampo("CveProgramaCONAC")
|
||||
End If
|
||||
'If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
' e.Row.FCDropDownList("DdlProgramaCONAC").DataSource = GlobalDTAC_ProgramasCONAC
|
||||
' e.Row.FCDropDownList("DdlProgramaCONAC").DataBind()
|
||||
' e.Row.FCDropDownList("DdlProgramaCONAC").SelectedValue = e.Row.DBCampo("CveProgramaCONAC")
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -4116,12 +4116,13 @@ Public Class ClsBancos
|
||||
|
||||
#Region "CONCILIACIÓN BANCARIA"
|
||||
|
||||
Public Function UpdateConciliacionBancaria(CveIE As Integer, FechaAplicado As Date) As Boolean
|
||||
Public Function UpdateConciliacionBancaria(CveIE As Integer, FechaAplicado As Date, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Banc_ConciliacionBancariaUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
.Add("@FechaAplicado", SqlDbType.Date).Value = FechaAplicado
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -4215,12 +4216,13 @@ Public Class ClsBancos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DesconciliarIE(CveIE As Integer, FechaDesconciliado As Date) As Boolean
|
||||
Public Function DesconciliarIE(CveIE As Integer, FechaDesconciliado As Date, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Banc_IEDesconciliar")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
.Add("@FechaDesconciliado", SqlDbType.Date).Value = FechaDesconciliado
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -146,6 +146,7 @@ Public Class ClsContratos
|
||||
Public Property Ubicacion As String
|
||||
Public Property Responsable As String
|
||||
Public Property Lugar As String
|
||||
Public Property LimiteDeGasto As Double
|
||||
Public Property CveSubProyecto As Integer
|
||||
Public Property SubProyectoContrato As String
|
||||
Public Property CveProyecto As Integer
|
||||
@@ -291,7 +292,8 @@ Public Class ClsContratos
|
||||
Me.FechaVenc = Data.Rows(0)("FechaVenc").ToString.ToDate
|
||||
Me.CveVendedor = Data.Rows(0)("CveVendedor").ToString.ToEntero
|
||||
Me.ImporteTotal = Data.Rows(0)("ImporteTotal").ToString.ToDecimal
|
||||
Me.Lugar = Data.Rows(0)("Lugar").ToString
|
||||
Me.Lugar = Data.Rows(0)("Lugar").ToString
|
||||
Me.LimiteDeGasto = Data.Rows(0)("LimiteDeGasto").ToString.ToDouble
|
||||
|
||||
Observaciones = Data.Rows(0)("Observaciones").ToString
|
||||
CveDireccionEnvio = Data.Rows(0)("CveDireccionEnvio").ToString.ToEntero
|
||||
@@ -543,7 +545,7 @@ Public Class ClsContratos
|
||||
Geom As String, CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer,
|
||||
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
|
||||
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
|
||||
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "") As Integer
|
||||
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "", Optional LimiteDeGasto As Double = 0) As Integer
|
||||
|
||||
Dim Retorno As Integer = -1
|
||||
DataAdapter("PA_Con_ContratosObraAdd")
|
||||
@@ -595,6 +597,7 @@ Public Class ClsContratos
|
||||
.Add("@AplicaImpuestosLocales", SqlDbType.Bit).Value = If(AplicaImpuestosLocales, 1, 0)
|
||||
.Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev
|
||||
.Add("@Lugar", SqlDbType.VarChar).Value = Lugar
|
||||
.Add("@LimiteDeGasto", SqlDbType.Money).Value = LimiteDeGasto
|
||||
|
||||
.Add("@CveContrato", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
|
||||
@@ -621,7 +624,7 @@ Public Class ClsContratos
|
||||
CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer,
|
||||
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1.0, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
|
||||
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
|
||||
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "") As Boolean
|
||||
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "", Optional LimiteDeGasto As Double = 0) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Con_ContratosObraUpdate")
|
||||
@@ -671,7 +674,8 @@ Public Class ClsContratos
|
||||
.Add("@CveDireccionEnvio", SqlDbType.Int).Value = CveDireccionEnvio
|
||||
.Add("@AplicaImpuestosLocales", SqlDbType.Bit).Value = If(AplicaImpuestosLocales, 1, 0)
|
||||
.Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev
|
||||
.Add("@Lugar", SqlDbType.VarChar).Value = Lugar
|
||||
.Add("@Lugar", SqlDbType.VarChar).Value = Lugar
|
||||
.Add("@LimiteDeGasto", SqlDbType.Money).Value = LimiteDeGasto
|
||||
|
||||
End With
|
||||
|
||||
@@ -690,6 +694,26 @@ Public Class ClsContratos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetContratosObraEstadoCuenta(CveContrato As Integer, CveEmpresa As Integer, Opcion As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Con_ContratosEstadoCuentaGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al consultar el Estado de cuenta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "ESTIMACION OBRA"
|
||||
@@ -804,6 +828,74 @@ Public Class ClsContratos
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "GASTOS OBRA"
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function GetContratosObragGastosVeiculos(CveContrato As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Con_ContratosObraGastosVeiculosGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al consultar los gastos de veiculos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function GetContratosObragGastosCompras(CveContrato As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Con_ContratosObraGastosComprasGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al consultar los gastos de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetContratosObragGastosNomina(CveContrato As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Con_ContratosObraGastosNominaGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al consultar los gastos de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C I C L O C O M E R C I A L"
|
||||
Public Function CicloComercialAdd(CveContrato As Integer, CveCotizacion As Integer, CveCliente As Integer, FueFacturado As Boolean, CveFactura As Integer, Estatus As Integer, CveEmpresa As Integer, FechaVenc As Date) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -1802,9 +1894,49 @@ Public Class ClsContratos
|
||||
OnError("Ocurrió un error al obtener el Reporte de Contratos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetContratosAvanceEstimacionVentas(CveContrato As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Con_ContratosAvanceEstimacionVentasGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las estimaciones de Contratos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function UpdateContratosAvanceEstimacionVentas(CveEstimacion As Integer, CveVenta As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Con_ContratosAvanceEstimacionVentasUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEstimacion", SqlDbType.Int).Value = CveEstimacion
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar las estimaciones de Contratos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetRepContratos(pCveProveedor As Integer, pCveContrato As Integer, CveSeccion As Integer, pCvePS As Integer, pEstimacion As Integer, pCveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Con_RepContratosGet")
|
||||
@@ -2186,14 +2318,6 @@ Public Class ClsContratos
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function GetReporteContratosAvancesDetalleCP(CveContrato As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -2216,6 +2340,26 @@ Public Class ClsContratos
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetReporteContratosObraAvancesDetalle(CveContrato As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Con_ReporteContratosObraAvancesDetalleGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el Reporte de Avances Detalle CP.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetReporteContratosAvancesDetalleControl(CveContrato As Integer, CveEmpresa As Integer) As Boolean
|
||||
@@ -2253,6 +2397,29 @@ Public Class ClsContratos
|
||||
End With
|
||||
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el Reporte de Avances Detalle CP.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetVentasAvanceObra(CveContrato As Integer, CveClasificacion As Integer, CvePS As Integer, Tipo As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Con_RepVentasAvancesObra")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@Tipo", SqlDbType.Int).Value = Tipo
|
||||
End With
|
||||
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
@@ -2262,6 +2429,7 @@ Public Class ClsContratos
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetContratosAvancePorDocumento(CveContrato As Integer, TipoDocto As String, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -2470,9 +2638,10 @@ Public Class ClsContratos
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
Public Function GetContratosCostos(CveContrato As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveEstatus As Integer, Tipo As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ Public Class ClsInventarios
|
||||
Public Property CveGrupoPS As Integer
|
||||
Public Property CveFlete As Integer
|
||||
Public Property CveCliente As Integer
|
||||
Public Property CveVendedor As Integer
|
||||
Public Property CveClienteSucursal As Integer
|
||||
Public Property NombreCliente As String
|
||||
Public Property CveProveedor As Integer
|
||||
@@ -823,6 +824,7 @@ Public Class ClsInventarios
|
||||
FolioInterno = dr("VentaAnticipo").ToString
|
||||
CveCliente = If(dr("CveCliente").ToString.ToEntero > 0, dr("CveCliente").ToString.ToEntero, -1)
|
||||
CveClienteSucursal = If(dr("CveClienteSucursal").ToString.ToEntero > 0, dr("CveClienteSucursal").ToString.ToEntero, -1)
|
||||
CveVendedor = If(dr("CveVendedor").ToString.ToEntero > 0, dr("CveVendedor").ToString.ToEntero, -1)
|
||||
NombreCliente = dr("Nombre").ToString
|
||||
CveProveedor = If(dr("CveProveedor").ToString.ToEntero > 0, dr("CveProveedor").ToString.ToEntero, -1)
|
||||
DepartamentoEntrega = dr("DepartamentoEntrega").ToString
|
||||
|
||||
@@ -1252,7 +1252,7 @@ Public Class ClsOC
|
||||
pObservacion As String, pCveUsuario As Integer, Optional pCveOrdenCompraPadre As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Double = 0,
|
||||
Optional IEPSPS As Double = 0, Optional IEPSPSIVA As Double = 0, Optional IVA As Double = 0, Optional RetIVA As Double = 0, Optional RetISR As Double = 0, Optional Total As Double = 0,
|
||||
Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Double = 0, Optional RetIVAPorcentaje As Double = 0, Optional RetISRPorcentaje As Double = 0, Optional IEPSPSPorcentaje As Double = 0,
|
||||
Optional IEPSPSIVAPorcentaje As Double = 0, Optional CveVentaDetalleCotizacion As Integer = -1, Optional CveTipoGastoObra As Integer = -1) As Boolean
|
||||
Optional IEPSPSIVAPorcentaje As Double = 0, Optional CveVentaDetalleCotizacion As Integer = -1, Optional CveTipoGastoObra As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_OC_OrdenesCompraDetalleAdd")
|
||||
|
||||
@@ -1284,8 +1284,7 @@ Public Class ClsOC
|
||||
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Float).Value = IEPSPSIVAPorcentaje
|
||||
.Add("@CveVentaDetalleCotizacion", SqlDbType.Int).Value = CveVentaDetalleCotizacion
|
||||
.Add("@CveTipoGastoObra", SqlDbType.Int).Value = CveTipoGastoObra
|
||||
|
||||
|
||||
.Add("@CveCultivoCuadroDetalle", SqlDbType.Int).Value = CveCultivoCuadroDetalle
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -494,7 +494,7 @@ Public Class ClsProductosServicios
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("El Nuevo Producto o Servicio no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia)
|
||||
ElseIf Ex1.Message.Contains("Número: 2601;") Then
|
||||
Alert("El Nuevo Producto o Servicio tiene Codigo duplicado.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("El Nuevo Producto o Servicio tiene Codigo duplicado:" & Codigo, TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al guardar el nuevo Producto o Servicio.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
|
||||
@@ -3738,7 +3738,7 @@ Public Class ClsVentas
|
||||
|
||||
#Region "COMISIONES"
|
||||
|
||||
Public Function GetRepComisiones(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveVendedor As Integer, CveCliente As Integer, CveUsuario As Integer, CveEmpresa As Integer, TipoSaldo As Integer) As Boolean
|
||||
Public Function GetRepComisiones(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveVendedor As Integer, CveCliente As Integer, CveUsuario As Integer, CveEmpresa As Integer, TipoSaldo As Integer, Optional EsquemaNuevo As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RepComisiones119")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -3750,6 +3750,7 @@ Public Class ClsVentas
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@TipoSaldo", SqlDbType.Int).Value = TipoSaldo
|
||||
.Add("@EsquemaNuevo", SqlDbType.Bit).Value = EsquemaNuevo
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -178,7 +178,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
If Not CBool(Dr("FueConciliado").ToString) And Dr("CveIE").ToString.ToEntero > 0 Then
|
||||
For Each DrE As DataRow In DtDatosEdoCuenta.Rows
|
||||
If ((Dr("FechaDocumento").ToString.ToDate = DrE("FechaDocumento").ToString.ToDate And Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 1) Or (Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 2)) And Not CBool(DrE("Seleccionado").ToString) And Not CBool(DrE("FueConciliado").ToString) And Not CBool(Dr("Seleccionado").ToString) Then
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate)) Or Not ObjBancos.UpdateIEEstadoCuenta(DrE("CveIEEstadoCuenta").ToString.ToEntero, DrE("Importe").ToString.ToDouble, True, Dr("CveIE").ToString.ToEntero,
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate), UsuarioActual.CveUsuario) Or Not ObjBancos.UpdateIEEstadoCuenta(DrE("CveIEEstadoCuenta").ToString.ToEntero, DrE("Importe").ToString.ToDouble, True, Dr("CveIE").ToString.ToEntero,
|
||||
DrE("Referencia").ToString, DrE("Tipo").ToString, DrE("FechaDocumento").ToString.ToDate, DrE("CveCuenta").ToString.ToEntero) Then
|
||||
ErrorTrans = True
|
||||
Else
|
||||
@@ -283,7 +283,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
Dim CveIE As Integer = 0
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate)) Then
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate), UsuarioActual.CveUsuario) Then
|
||||
ErrorTrans = True
|
||||
Else
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido conciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Gvr.DataKey("CveIE").ToEntero) Then
|
||||
@@ -350,7 +350,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then
|
||||
Selecciono = True
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate)) Then
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate), UsuarioActual.CveUsuario) Then
|
||||
ErrorTrans = True
|
||||
Else
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido conciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Gvr.DataKey("CveIE").ToEntero) Then
|
||||
@@ -402,7 +402,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
Dim ErrorTrans As Boolean = False
|
||||
|
||||
If ModalidadDesconciliar = "D" Then
|
||||
If ObjBancos.DesconciliarIE(CveIEDesconciliar, TxtFechaDesconciliado.Text.ToDate()) Then
|
||||
If ObjBancos.DesconciliarIE(CveIEDesconciliar, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario) Then
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido desconciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIEDesconciliar) Then
|
||||
ErrorTrans = True
|
||||
End If
|
||||
@@ -412,7 +412,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
ElseIf ModalidadDesconciliar = "DT" Then
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
If Gvr.FCCheckBox("ChkConciliado").Checked And Not Gvr.FCCheckBox("ChkConciliado").Enabled Then
|
||||
If Not ObjBancos.DesconciliarIE(Gvr.DataKey("CveIE").ToEntero, TxtFechaDesconciliado.Text.ToDate()) Then
|
||||
If Not ObjBancos.DesconciliarIE(Gvr.DataKey("CveIE").ToEntero, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario) Then
|
||||
ErrorTrans = True
|
||||
Else
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido desconciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Gvr.DataKey("CveIE").ToEntero) Then
|
||||
|
||||
@@ -218,9 +218,9 @@ Partial Class Bancos_PolizaCheque
|
||||
|
||||
|
||||
|
||||
If DdlTipoTransaccion.SelectedValue.ToEntero = 3 Then
|
||||
dt = dt.FiltraParametros("CveTipoCuenta = 7")
|
||||
End If
|
||||
'If DdlTipoTransaccion.SelectedValue.ToEntero = 3 Then
|
||||
' dt = dt.FiltraParametros("CveTipoCuenta = 7")
|
||||
'End If
|
||||
|
||||
'cuando es layout
|
||||
If DdlTipoTransaccion.SelectedValue.ToEntero = 9 Then
|
||||
|
||||
@@ -160,7 +160,7 @@ Partial Class Bancos_RepComplementoPago
|
||||
e.Row.FCCheckBox("Chk").Visible = False
|
||||
End If
|
||||
|
||||
e.Row.FCCheckBox("Chk").ToolTip = "Hay una inconsistencia entre lo pagado en las facturas y el importe expedido"
|
||||
e.Row.FCCheckBox("Chk").ToolTip += ". Hay una inconsistencia entre lo pagado en las facturas y el importe expedido"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
14409
Bin/Newtonsoft.Json.xml
14409
Bin/Newtonsoft.Json.xml
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,8 @@ Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Xml
|
||||
Imports System.IO
|
||||
Imports iTextSharp.text
|
||||
Imports iTextSharp.text.pdf
|
||||
|
||||
Imports Stimulsoft.Report
|
||||
Imports Stimulsoft.Report.Components
|
||||
@@ -283,6 +285,12 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End If
|
||||
|
||||
If UrlParametros("OP").ToString = "Etiqueta" Then
|
||||
If UrlParametros("CVEMOVIMIENTO") IsNot Nothing AndAlso UrlParametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
|
||||
ImprimirEtiqueta(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero, UrlParametros("MODALIDAD").ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
'IMPRIME OC
|
||||
If UrlParametros("OP").ToString = "OC" Then
|
||||
If UrlParametros("CVEOC") IsNot Nothing AndAlso UrlParametros("CVEOC").ToString.ToEntero > 0 Then
|
||||
@@ -4320,7 +4328,82 @@ Partial Class PopUpVerFactura
|
||||
ImprimirPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/EntregasPorRealizar.rdlc", DtPaqueteriasGuias, RepParams, "Entregas por realizar", "PDF", RDSName:="DsInventarios")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = Etiqueta - Etiquetas de recepcion"
|
||||
Private Sub ImprimirEtiqueta(CveMovimiento As Integer, Modalidad As String)
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
Dim All As Byte()
|
||||
Using ms As New MemoryStream
|
||||
Using d As New Document
|
||||
Using Copy As New PdfCopy(d, ms)
|
||||
d.Open()
|
||||
If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventarios.DtResultados IsNot Nothing Then
|
||||
For Each DetalleRow As DataRow In ObjInventarios.DtResultados.Rows
|
||||
Dim CvePS As Integer = DetalleRow.Item("CvePS").ToString.ToEntero
|
||||
Dim Lote As String = DetalleRow.Item("Lote").ToString
|
||||
Dim FechaCaducidad As Date = DetalleRow.Item("FechaCaducidad").ToString.ToDate
|
||||
Dim PS As String = String.Format("{0} - {1}", DetalleRow.Item("Codigo").ToString, DetalleRow.Item("PS").ToString)
|
||||
If Modalidad = "Individual" Then
|
||||
Dim reporteByte As Byte() = GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)
|
||||
|
||||
Dim reader As New PdfReader(reporteByte)
|
||||
Dim Paginas As Integer = reader.NumberOfPages
|
||||
Dim Contador As Integer = 0
|
||||
While Contador < Paginas
|
||||
Contador += 1
|
||||
Copy.AddPage(Copy.GetImportedPage(reader, Contador))
|
||||
End While
|
||||
Else
|
||||
Dim Cant As Integer = DetalleRow.Item("Cantidad").ToString.ToEntero - 1
|
||||
|
||||
For contador As Integer = 0 To Cant
|
||||
Dim reporteByte As Byte() = GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)
|
||||
|
||||
Dim reader As New PdfReader(reporteByte)
|
||||
Dim Paginas As Integer = reader.NumberOfPages
|
||||
Dim Cont As Integer = 0
|
||||
While Cont < Paginas
|
||||
Cont += 1
|
||||
Copy.AddPage(Copy.GetImportedPage(reader, Cont))
|
||||
End While
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
d.Close()
|
||||
|
||||
End Using
|
||||
End Using
|
||||
All = ms.ToArray()
|
||||
End Using
|
||||
ImprimirbytesPDF(All, "Etiquetas")
|
||||
|
||||
|
||||
If Modalidad = "Individual" Then
|
||||
Else
|
||||
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Function GenerarEtiqueta(CvePS As Integer, Lote As String, FechaCaducidad As Date, PS As String) As Byte()
|
||||
Dim QrDescarga As String = ""
|
||||
Dim Cfdi As New RVCFDI33.GeneraCFDI()
|
||||
Dim b As Byte() = Cfdi.ConvertirQrCode(String.Format("?CvePS={0}&Lote={1}&Fecha={2}", CvePS, Lote, Format(FechaCaducidad, "dd/MM/yyyy").ToString()))
|
||||
QrDescarga = Convert.ToBase64String(b)
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("QR", QrDescarga))
|
||||
params.Add(New ReportParameter("PS", PS))
|
||||
params.Add(New ReportParameter("Lote", Lote))
|
||||
params.Add(New ReportParameter("FechaCad", FechaCaducidad.ToString()))
|
||||
Return StreamPDF("Empresas/Grales/Formatos/EtiquetaDeRecepcion.rdlc", New DataTable, params)
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Left>0cm</Left>
|
||||
<Height>0.98806cm</Height>
|
||||
<Width>20.2388cm</Width>
|
||||
<Style>
|
||||
@@ -92,7 +91,6 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Top>0.98806cm</Top>
|
||||
<Left>0cm</Left>
|
||||
<Height>0.99741cm</Height>
|
||||
<Width>20.2388cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
@@ -458,7 +456,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Deudor Acreedor</Value>
|
||||
<Value>Deudor Acreedor</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -1387,7 +1385,6 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Left>0cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>20.2388cm</Width>
|
||||
<Visibility>
|
||||
@@ -1435,6 +1432,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Top>0cm</Top>
|
||||
<Left>14.86367cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>5.37513cm</Width>
|
||||
@@ -1455,7 +1453,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>="Fecha Impresión:" & vbCrLf & DateTime.Now.ToString("dd-MM-yyyy")</Value>
|
||||
<Value>="Fecha Impresión:" & vbCrLf & DateTime.Now.ToString("dd/MM/yyyy HH:mmm")</Value>
|
||||
<Style>
|
||||
<FontStyle>Italic</FontStyle>
|
||||
<FontSize>7pt</FontSize>
|
||||
@@ -1468,7 +1466,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Left>0cm</Left>
|
||||
<Top>0cm</Top>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>3.43894cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
@@ -1482,6 +1480,38 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox12">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>="Usuario Imprimio: " & Parameters!UsuarioImprimio.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox12</rd:DefaultName>
|
||||
<Top>0cm</Top>
|
||||
<Left>9.48438cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>5.37929cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1623,6 +1653,12 @@
|
||||
<DataType>String</DataType>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="UsuarioImprimio">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>72dd790f-bb87-41b4-98ee-ff673dfb3643</rd:ReportID>
|
||||
|
||||
@@ -238,6 +238,7 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("pFechaIni", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
|
||||
@@ -1125,10 +1125,14 @@ Partial Class Contratos_Default
|
||||
|
||||
CargaPresupuesto()
|
||||
' MuestraPermiteAvance()
|
||||
cargarBitacora()
|
||||
If LblImporte.Text.ToDecimal <= 0 Then
|
||||
LblImporte.Text = ObjContratos.ImporteTotal.ToString.FormatoNumero
|
||||
End If
|
||||
cargarBitacora()
|
||||
|
||||
'If LblImporte.Text.ToDecimal <= 0 Then
|
||||
'LblImporte.Text = ObjContratos.ImporteTotal.ToString.FormatoNumero
|
||||
|
||||
|
||||
LblImporte.Text = ObjContratos.DtResultados.Rows(0)("ImporteTotalIndicador").ToString().ToDecimal.ToString.FormatoNumero
|
||||
'End If
|
||||
|
||||
If Not IsDBNull(ObjContratos.Archivo) AndAlso ObjContratos.Archivo <> "" AndAlso ObjContratos.Archivo <> "-1" AndAlso ObjContratos.Archivo <> $"{ObjContratos.CveContrato}." Then
|
||||
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "CONTRATOS", ObjContratos.Archivo)
|
||||
@@ -1194,7 +1198,7 @@ Partial Class Contratos_Default
|
||||
LbTotalGeneral.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=2").SUM("Total").FormatoNumero()
|
||||
LbTotalGeneralInsumos.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=1").SUM("Total").FormatoNumero()
|
||||
LbTotalGeneralInt.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=1").SUM("Total").FormatoNumero()
|
||||
LblImporte.Text = "$" & TmpDT.FiltraParametros("CveTipoPresupuesto=2").SUM("Total").FormatoNumero()
|
||||
'LblImporte.Text = "$" & TmpDT.FiltraParametros("CveTipoPresupuesto=2").SUM("Total").FormatoNumero()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1936,7 +1940,7 @@ Partial Class Contratos_Default
|
||||
TxtPU.Text = ""
|
||||
DdlClasificacionAdd.SelectedValue = "-1"
|
||||
LbTotalGeneral.Text = (LbTotalGeneral.Text.ToDouble + TotalRow).ToString.FormatoNumero
|
||||
LblImporte.Text = LbTotalGeneral.Text
|
||||
'LblImporte.Text = LbTotalGeneral.Text
|
||||
TxtCantidad.Focus()
|
||||
UpGral.Update()
|
||||
Else
|
||||
@@ -1953,8 +1957,8 @@ Partial Class Contratos_Default
|
||||
'If ContratosSecciones.GetContratosSecciones(-1, DdlEstatus.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, DdlContrato.SelectedValue.ToEntero, -1, -1, FechaI, FechaF) Then
|
||||
DtDatos = ContratosSecciones.DtResultados
|
||||
' DtDatos.Rows.RemoveAt(0)
|
||||
CargaGVPresupuestos(DtDatos)
|
||||
LblImporte.Text = "$" & DtDatos.MAX("Total").FormatoNumero()
|
||||
CargaGVPresupuestos(DtDatos)
|
||||
' LblImporte.Text = "$" & DtDatos.MAX("Total").FormatoNumero()
|
||||
Else
|
||||
Gv.DataSource = Nothing
|
||||
End If
|
||||
@@ -2092,7 +2096,7 @@ Partial Class Contratos_Default
|
||||
|
||||
Gv.EditIndex = -1
|
||||
LbTotalGeneral.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=2").SUM("Total").FormatoNumero
|
||||
LblImporte.Text = LbTotalGeneral.Text
|
||||
'LblImporte.Text = LbTotalGeneral.Text
|
||||
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
||||
|
||||
End Sub
|
||||
@@ -2178,8 +2182,8 @@ Partial Class Contratos_Default
|
||||
TxtCantidadInsumos.Text = ""
|
||||
TxtPUInsumos.Text = ""
|
||||
DdlClasificacionAddInsumos.SelectedValue = "-1"
|
||||
LbTotalGeneralInsumos.Text = (LbTotalGeneralInsumos.Text.ToDouble + TotalRow).ToString.FormatoNumero
|
||||
'LblImporte.Text = LbTotalGeneral.Text
|
||||
LbTotalGeneralInsumos.Text = (LbTotalGeneralInsumos.Text.ToDouble + TotalRow).ToString.FormatoNumero
|
||||
|
||||
TxtCantidadInsumos.Focus()
|
||||
UpGral.Update()
|
||||
Else
|
||||
@@ -2273,8 +2277,8 @@ Partial Class Contratos_Default
|
||||
End If
|
||||
|
||||
GvInsumos.EditIndex = -1
|
||||
LbTotalGeneralInsumos.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=1").SUM("Total").FormatoNumero
|
||||
'LblImporte.Text = LbTotalGeneral.Text
|
||||
LbTotalGeneralInsumos.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=1").SUM("Total").FormatoNumero
|
||||
|
||||
CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1"))
|
||||
|
||||
End Sub
|
||||
@@ -3423,7 +3427,7 @@ Partial Class Contratos_Default
|
||||
Dim ClaveInterna As String = Row("Clave Interna Cliente").ToString.Trim.ToUpper
|
||||
Dim OCInterna As String = Row("OC Interna").ToString.Trim.ToUpper
|
||||
Dim ProductoServicio As String = Row("Producto/Servicio").ToString.Trim.ToUpper
|
||||
Dim PrecioUnitario As Double = Row("Precio Unitario").ToString.ToDouble
|
||||
Dim PrecioUnitario As Double = Row("Precio Unitario").ToString.Replace("$", "").ToString.Replace(" ", "").ToDouble
|
||||
Dim CvePS As Integer = 0
|
||||
Dim CveUM As Integer = 0 ' GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"CvePS = '{CvePS}'").ToString.ToEntero
|
||||
Dim CodigoPS As Integer = 0
|
||||
@@ -3492,8 +3496,8 @@ Partial Class Contratos_Default
|
||||
Dim TotalRow = dr("Total").ToString.ToDouble
|
||||
|
||||
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
||||
LbTotalGeneral.Text = (LbTotalGeneral.Text.ToDouble + TotalRow).ToString.FormatoNumero
|
||||
LblImporte.Text = LbTotalGeneral.Text
|
||||
LbTotalGeneral.Text = (LbTotalGeneral.Text.ToDouble + TotalRow).ToString.FormatoNumero
|
||||
' LblImporte.Text = LbTotalGeneral.Text
|
||||
Else
|
||||
Alert("Ocurrio un error al agregar el detalle", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
@@ -100,10 +100,7 @@
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -96,8 +96,8 @@ Partial Class Contratos_ContratoAvance
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not IsPostBack Then
|
||||
BtnGuardar.Visible = False
|
||||
btnanexogral.Visible = False
|
||||
BtnGuardar.Visible = False
|
||||
|
||||
CargaContrato()
|
||||
|
||||
|
||||
@@ -146,16 +146,16 @@ Partial Class Contratos_ContratoAvance
|
||||
fecha = ""
|
||||
DtDatos = ObjContratos.DtResultados
|
||||
If ObjContratos.DtResultados.Rows.Count > 0 Then
|
||||
BtnGuardar.Visible = True
|
||||
btnanexogral.Visible = True
|
||||
BtnGuardar.Visible = True
|
||||
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If ObjContratos.GetContratosAvanceHistoricos(CveContrato, 2, DdlAvances.SelectedValue) Then
|
||||
fecha = DdlAvances.SelectedValue
|
||||
DtDatos = ObjContratos.DtResultados
|
||||
BtnGuardar.Visible = False
|
||||
btnanexogral.Visible = False
|
||||
BtnGuardar.Visible = False
|
||||
|
||||
End If
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
@@ -280,7 +280,7 @@ Partial Class Contratos_ContratoAvance
|
||||
Dim TieneError = False
|
||||
Dim CveContratoDetalle As Integer
|
||||
Dim Cantidad As Double
|
||||
Dim filesgral As List(Of Archivo) = AnexoGral.getfiles().Archivos
|
||||
'Dim filesgral As List(Of Archivo) = AnexoGral.getfiles().Archivos
|
||||
Dim guardarArchivos As New List(Of Archivo)
|
||||
|
||||
For Each gvr As GridViewRow In Gv.Rows
|
||||
@@ -328,9 +328,10 @@ Partial Class Contratos_ContratoAvance
|
||||
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
|
||||
|
||||
'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.Replace($".{fileItem.Extencion}", ""), urlsave)
|
||||
@@ -338,7 +339,7 @@ Partial Class Contratos_ContratoAvance
|
||||
ObjContratos.Commit()
|
||||
Alert("se guardo Correctamente")
|
||||
End If
|
||||
AnexoGral.Text = "[]"
|
||||
'AnexoGral.Text = "[]"
|
||||
ObjContratos.Dispose()
|
||||
CargaddlAvance()
|
||||
CargaDatosAvance()
|
||||
|
||||
@@ -75,87 +75,7 @@
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<%-- <li runat="server" id="liTerminarContrato" visible="false">
|
||||
<asp:LinkButton ID="LBTerminarContrato" Visible="false" OnClick="LBTerminarContrato_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de terminar el contrato?" data-btn-ok-label="si"> <i class="fa fa-check"> </i> Concluir Contrato</asp:LinkButton>
|
||||
</li>
|
||||
<li runat="server" id="liCancelarContrato" visible="false">
|
||||
<asp:LinkButton ID="LBCancelarContrato" Visible="false" OnClick="LBCancelarContrato_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de cancelar el contrato?" data-btn-ok-label="si"> <i class="fa fa-times"> </i> Cancelar Contrato</asp:LinkButton>
|
||||
</li>
|
||||
<li runat="server" id="liVigenteContrato" visible="false">
|
||||
<asp:LinkButton ID="LBVigenteContrato" Visible="false" OnClick="LBVigenteContrato_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de pasar a vigente el contrato?" data-btn-ok-label="si"> <i class="fa fa-times"> </i> Reactivar Contrato</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LbDescargarExcel" Visible="True" OnClick="LbDescargarExcel_Click" runat="server"><i class='fa fa-file-excel-o' style="font-weight:bold;"></i> Descargar Formato</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="LbCrearApartirDe" NavigateUrl="#" data-toggle="modal" data-target="#ModalCrearApartirDe" runat="server"><i class='fa fa-refresh'></i> Crear A Partir De</asp:HyperLink>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:HyperLink ID="HlAgregarExcel" NavigateUrl="#" Visible="True" data-toggle="modal" data-target="#DivCargaExcel" runat="server"><i class='fa fa-server'></i> Importar Listado</asp:HyperLink>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LBAgregarGasto" runat="server"><i class="fa fa-plus"></i> Agregar Gastos</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LBImprimir" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Avance por Documento PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="liImprimir" runat="server" Visible="false"><i class='fa fa-download'></i> Descargar Contrato</i></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LBImprimirInformacionG" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Informacion PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LBImprimirGastos" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Gastos PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LbImprimirSuministros" Visible="true" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Suministros PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="lbImprimirAvance" Visible="False" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Avance PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LbImprimirPresupuesto" Visible="true" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Presupuesto PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LbImprmirAF" Visible="true" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Activos Fijos PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LbImprmirAFExcel" Visible="true" runat="server"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Activos Fijos Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LbImprimirPedDev" Visible="true" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Pedidos / Devoluciones PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LbImprimirPedDevExcel" Visible="true" runat="server"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Pedidos / Devoluciones Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpHajusteAcciones" runat="server" UpdateMode="Conditional">
|
||||
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAjusteAF" Visible="true" runat="server" OnClick="LnkAjusteAF_Click"> <i class="fa fa-pencil" style="font-weight:bold;"></i>Habilitar Ajuste A.F.</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpAccionesPresupuestos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -165,7 +85,7 @@
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkModalAddPSControl" Visible="false" runat="server" OnClick="LnkModalAddPSControl_Click"> <i class="fa fa-plus" style="font-weight:bold;"></i>Agregar PS Control</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkModalAddPSControl" Visible="false" runat="server" OnClick="LnkModalAddPSControl_Click"> <i class="fa fa-plus" style="font-weight:bold;"></i>Agregar PS Interno</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -174,7 +94,12 @@
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkModalAddPresupuestoControl" Visible="false" runat="server" OnClick="LnkModalAddPresupuestoControl_Click"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i>Agregar Presupuesto Control</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkModalAddPresupuestoControl" Visible="false" runat="server" OnClick="LnkModalAddPresupuestoControl_Click"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i>Agregar Presupuesto Interno</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkModalAddGastos" Visible="false" runat="server" OnClick="LnkModalAddGastos_Click"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i>Agregar Gasto</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -650,10 +575,20 @@
|
||||
<asp:TextBox ID="txtMaximo" runat="server" MaxLength="12" Width="150px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="txtMaximo" FilterType="Custom, Numbers" ValidChars=",." BehaviorID="_content_SoloNumeros" />
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<div class="row" runat="server">
|
||||
<label class="col-md-2 truncate ">% Limite de Gastos:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtLimiteGastos" runat="server" MaxLength="5" Width="150px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtLimiteGastos" FilterType="Custom, Numbers" ValidChars=",." BehaviorID="_content_SoloNumeros" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="DvTotal" runat="server">
|
||||
<label class="col-md-2 truncate ">Total:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtTotal" runat="server" MaxLength="12" Width="150px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender8" runat="server" TargetControlID="TxtTotal" FilterType="Custom, Numbers" ValidChars=",." BehaviorID="_content_SoloNumeros" />
|
||||
<asp:TextBox ID="TxtTotal" runat="server" MaxLength="12" Width="150px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender8" runat="server" TargetControlID="TxtTotal" FilterType="Custom, Numbers" ValidChars=",." BehaviorID="_content_SoloNumeros" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -955,21 +890,10 @@
|
||||
<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,PermitirAvance"
|
||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,OCInterna,NoIdentificacion,PermitirAvance,CantidadContratada"
|
||||
ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="OC <br/> Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LbOCInternaEdit" Text='<%# Eval("OCInterna")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtOCInternaEdit" MaxLength="15" runat="server" Text='<%# Eval("OCInterna") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtCantidad" Text='<%# Eval("CantidadContratada")%>' runat="server"></asp:Literal>
|
||||
@@ -980,24 +904,8 @@
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Limitar">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblLimitar" Text='<%# If(Eval("LimitarCantidad").ToString = "True", "Si", "No")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkLimitarCantidad" runat="server" Checked='<%# Eval("LimitarCantidad").ToString%>'></asp:CheckBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<%-- <asp:TemplateField HeaderText="Clave Int. Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblNoIdentificacion" Text='<%# Eval("NoIdentificacion")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtNoIdentificacion" MaxLength="15" runat="server" Text='<%# Eval("NoIdentificacion") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
|
||||
@@ -1124,7 +1032,7 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabPVInsumos" runat="server" HeaderText="Control">
|
||||
<ajax:TabPanel ID="TabPVInsumos" runat="server" HeaderText="Interno">
|
||||
<ContentTemplate>
|
||||
|
||||
<%-- <asp:UpdatePanel ID="UpTitulosInsumos" runat="server" UpdateMode="Conditional">
|
||||
@@ -1204,7 +1112,7 @@
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvInsumos" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos"
|
||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,NoIdentificacion" ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF"
|
||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,NoIdentificacion,CantidadContratada" ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
|
||||
<Columns>
|
||||
@@ -1218,24 +1126,8 @@
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="150px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Limitar">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblLimitar" Text='<%# If(Eval("LimitarCantidad").ToString = "True", "Si", "No")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkLimitarCantidad" runat="server" Checked='<%# Eval("LimitarCantidad").ToString%>'></asp:CheckBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<%-- <asp:TemplateField HeaderText="Clave <br/> Interna">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblNoIdentificacion" Text='<%# Eval("NoIdentificacion")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtNoIdentificacion" MaxLength="15" runat="server" Text='<%# Eval("NoIdentificacion") %>' Width="70px"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
|
||||
@@ -1559,7 +1451,9 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvDatosAvance" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<asp:GridView ID="GvDatosAvance" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados"
|
||||
DataKeyNames="CveClasificacion,CvePS,CodigoPS,Clasificacion"
|
||||
CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
|
||||
|
||||
@@ -1590,6 +1484,7 @@
|
||||
<asp:LinkButton ID="LBAvanceXFacturarImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField HeaderText="Importe $" DataField="Anticipos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="10%" />
|
||||
|
||||
</Columns>
|
||||
@@ -1628,7 +1523,9 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvDatosAvanceControl" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<asp:GridView ID="GvDatosAvanceControl" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados"
|
||||
DataKeyNames="CveClasificacion,CvePS,CodigoPS,Clasificacion"
|
||||
CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
|
||||
|
||||
@@ -1684,6 +1581,238 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabEstadoCuenta" Visible="False" runat="server" HeaderText="Estado de Cuenta">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpEstoCuenta" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title="" title=""></a><span class="hidden">
|
||||
<input id="chkestadocuentaantyicipos" type="checkbox" name="nmchkestadocuentaantyicipos" checked="checked"></span>
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-list"></i>Anticipos</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
|
||||
<asp:GridView ID="GvEstadoCuentaAnticipos" ClientIDMode="Static" ShowHeader="true" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron documentos."
|
||||
CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:HyperLinkField HeaderText="Serie-Folio" DataTextField="SerieFolio" Target="_blank" ItemStyle-Width="10%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Importe" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title="" title=""></a><span class="hidden">
|
||||
<input id="chkestadocuentaFacturas" type="checkbox" name="nmchkestadocuentaFacturas" checked="checked"></span>
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-list"></i>Facturas</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
|
||||
<asp:GridView ID="GvEstadoCuentaFacturas" ClientIDMode="Static" ShowHeader="true" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron documentos."
|
||||
CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:HyperLinkField HeaderText="Serie-Folio" DataTextField="SerieFolio" Target="_blank" ItemStyle-Width="10%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Importe" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField HeaderText="Amortizado" DataField="ImporteAmortizado" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabGastos" HeaderText="Gastos" runat="server" Visible="false">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpGastos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>Contrato:</td><td><asp:Label runat="server" ID="LblGastoContrato" Font-Size="18px" Font-Bold="True" ></asp:Label></td>
|
||||
<td>Gastos:</td><td><asp:Label runat="server" ID="LblGastoGastos" Font-Size="18px" Font-Bold="True" ></asp:Label></td>
|
||||
<td>Nomina:</td><td><asp:Label runat="server" ID="LblGastoNomina" Font-Size="18px" Font-Bold="True" ></asp:Label></td>
|
||||
<td>Indirectos:</td><td><asp:Label runat="server" ID="LblGastoIndirectos" Font-Size="18px" Font-Bold="True" ></asp:Label></td>
|
||||
<td>%Gasto:</td><td><asp:Label runat="server" ID="LblGastoPorcentaje" Font-Size="18px" Font-Bold="True" ></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title="" title=""></a><span class="hidden">
|
||||
<input type="checkbox" checked="checked"></span>
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-list"></i>vehículos</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
|
||||
<asp:GridView ID="GvGastosVeiculos" ClientIDMode="Static" ShowHeader="true" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron gastos de veiculos"
|
||||
DataKeyNames="CveContratoGasto,ORDEN"
|
||||
CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField HeaderText="Descripcion" DataField="Observaciones" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Importe" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Nombre" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="25%" HeaderText="Acciones" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEliminarGasto" runat="server" OnClick="LnkEliminarGasto_Click" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Desea eliminar el gasto?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title="" title=""></a><span class="hidden">
|
||||
<input type="checkbox" checked="checked"></span>
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-list"></i>Compras</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
|
||||
<asp:GridView ID="GvGastosCompras" ClientIDMode="Static" ShowHeader="true" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron gastos de compras."
|
||||
DataKeyNames="CveContrato,ORDEN,CveCompra,Clasificacion,CveClasificacion"
|
||||
CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:HyperLinkField HeaderText="Serie-Folio" DataTextField="SerieFolio" Target="_blank" ItemStyle-Width="30%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Importe" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="Observaciones" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title="" title=""></a><span class="hidden">
|
||||
<input type="checkbox" checked="checked"></span>
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-list"></i>Nomina</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
|
||||
<asp:GridView ID="GvGastosNomina" ClientIDMode="Static" ShowHeader="true" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos de nomina."
|
||||
DataKeyNames="CveContrato,CvePersonal,NombreCompleto"
|
||||
CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:HyperLinkField HeaderText="Nombre" DataTextField="NombreCompleto" Target="_blank" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CvePersonal" DataNavigateUrlFormatString="/RH/Personal.aspx?CvePersonal={0}" />
|
||||
<asp:BoundField HeaderText="Puesto" DataField="Puesto" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Importe" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabAvanveDocumento" runat="server" HeaderText="Avance Por Documento">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -2075,7 +2204,11 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabAddendum" HeaderText="Addendum" runat="server" Visible="false">
|
||||
|
||||
|
||||
|
||||
|
||||
<%-- <ajax:TabPanel ID="TabAddendum" HeaderText="Addendum" runat="server" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:GridView runat="server" ID="GvAddendum" GridLines="None" ShowHeader="true" AutoGenerateColumns="false" DataKeyNames="CveContrato" CssClass="table table-striped table-hover Widthall">
|
||||
<Columns>
|
||||
@@ -2086,7 +2219,7 @@
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabPanel>--%>
|
||||
|
||||
<ajax:TabPanel ID="TabSistema" runat="server" HeaderText="Sistema">
|
||||
<ContentTemplate>
|
||||
@@ -2645,10 +2778,10 @@
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtOCInterna" CssClass="form-control" runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtOCInterna.ClientID.ToString()%>">OC:</label>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" CssClass="form-control" ></asp:TextBox>
|
||||
@@ -2659,15 +2792,15 @@
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkLimitarVenta" runat="server" CssClass="form-control" />
|
||||
<label for="<%= ChkLimitarVenta.ClientID.ToString()%>">Limitar:</label>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNoIdentificacionv" runat="server" MaxLength="15" CssClass="form-control" ></asp:TextBox>
|
||||
<label for="<%= TxtNoIdentificacionv.ClientID.ToString()%>">Clave Interna Cliente:</label>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -2739,15 +2872,15 @@
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkLimitarInsumos" runat="server" CssClass="form-control" />
|
||||
<label for="<%= ChkLimitarInsumos.ClientID.ToString()%>">Limitar:</label>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNoIdentificacionvInsumos" runat="server" MaxLength="15" CssClass="form-control" ></asp:TextBox>
|
||||
<label for="<%= TxtNoIdentificacionvInsumos.ClientID.ToString()%>">Clave Interna:</label>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -2797,14 +2930,11 @@
|
||||
|
||||
|
||||
<%--Modal Carga Presupuesto--%>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpModalCargaPresupuesto">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpModalCargaPresupuesto">
|
||||
<ContentTemplate>
|
||||
|
||||
<div id="ModalUploadPresupuesto" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
@@ -2844,6 +2974,49 @@
|
||||
|
||||
|
||||
|
||||
<%--MODAL CONTROL PRESUPUESTOS AGREGAR--%>
|
||||
|
||||
<div id="ModalControlAddGastoVeiculo" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalGastoVeiculos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="Literal6" runat="server">Agregar gasto de veiculo</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtGastosDescripcion" runat="server" Width="100%" CssClass="form-control" MaxLength="150"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtGastosDescripcion" runat="server" ControlToValidate="TxtGastosDescripcion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalGastos"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtGastosDescripcion.ClientID.ToString()%>">Descripción: </label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtGastosImporte" runat="server" CssClass="form-control" ></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtGastosImporte" runat="server" TargetControlID="TxtGastosImporte" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVTxtGastosImporte" runat="server" ControlToValidate="TxtGastosImporte" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalGastos"> </asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtGastosImporte.ClientID.ToString()%>">Importe:</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button Text="Guardar" runat="server" ID="BtnModalAgreagrGasto" Width="100px" OnClick="BtnModalAgreagrGasto_Click" ValidationGroup="GrpModalGastos" class="btn btn-success" />
|
||||
<button id="Button7" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<iframe id="my_iframe" style="display: none;"></iframe>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -168,7 +168,7 @@
|
||||
<div class="progress-info">
|
||||
|
||||
<div class="progress">
|
||||
<span runat="server" id="SPAvance1" style="width: 76%;" class="progress-bar progress-bar-success green-sharp">
|
||||
<span runat="server" id="SPAvance1" style="width:76%;" class="progress-bar progress-bar-success green-sharp">
|
||||
<%--<span runat="server" id="SPAvance2" class="sr-only">76% Avance</span>--%>
|
||||
</span>
|
||||
</div>
|
||||
@@ -220,7 +220,7 @@
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="progress">
|
||||
<span runat="server" id="SPFaltante" style="width: 76%;" class="progress-bar progress-bar-success red-haze">
|
||||
<span runat="server" id="SPFaltante" style="width:76%;" class="progress-bar progress-bar-success red-haze">
|
||||
<%--<span class="sr-only">76% Avance</span>--%>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -52,8 +52,8 @@ Partial Class RepContratosObraAvances
|
||||
Dim TotalFaltante As Decimal = TotalContratos - TotalAvance
|
||||
|
||||
|
||||
Dim TotalAvancePorcentaje As Decimal = (TotalAvance * 100) / TotalContratos
|
||||
Dim TotalFaltantePorcentaje As Decimal = 100 - TotalAvancePorcentaje
|
||||
Dim TotalAvancePorcentaje As Decimal = ((TotalAvance * 100) / TotalContratos).RoundAD(2)
|
||||
Dim TotalFaltantePorcentaje As Decimal = (100 - TotalAvancePorcentaje).RoundAD(2)
|
||||
|
||||
|
||||
LtlGrafNumeroContratos.Text = NumeroContratos.ToString
|
||||
|
||||
@@ -88,7 +88,13 @@ Partial Class RepContratosObraAvancesDetalle
|
||||
|
||||
Dim AvanceImporte As Decimal = DTDatos(0)("AvanceImporte").ToString.ToDecimal
|
||||
Dim TotalContratos As Decimal = DTDatos(0)("Importe").ToString.ToDecimal
|
||||
Dim TotalAvancePorcentaje As Decimal = (AvanceImporte * 100) / TotalContratos
|
||||
|
||||
Dim TotalAvancePorcentaje As Decimal = 0
|
||||
If TotalContratos > 0 Then
|
||||
TotalAvancePorcentaje = (AvanceImporte * 100) / TotalContratos
|
||||
End If
|
||||
|
||||
|
||||
Dim TotalFaltantePorcentaje As Decimal = 100 - TotalAvancePorcentaje
|
||||
|
||||
Dim FechaFinal As Date = DTDatos(0)("FechaFinal").ToString.ToDate
|
||||
@@ -151,7 +157,7 @@ Partial Class RepContratosObraAvancesDetalle
|
||||
Dim PlantillaAnexo As String = $"{UsuarioActual.Empresa.Ruta}\Formatos\Anexo.xlsx"
|
||||
|
||||
If Not System.IO.File.Exists(PlantillaAnexo) Then
|
||||
Alert("No se encuentra la platilla de anexos.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("No se encuentra la plantilla de anexos.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3" style="text-align:left!important">
|
||||
<div class="col-md-6" style="text-align:left!important">
|
||||
<strong> </strong>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="text-align:right!important">
|
||||
<div class="col-md-6" 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>
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GVDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron contratos con los Filtros seleccionados"
|
||||
<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>
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
<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 ">
|
||||
|
||||
@@ -57,8 +59,20 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row" style="margin-left: 0px;">
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row" >
|
||||
<label class="col-sm-1 truncate" style="text-align: right">Mostrar Lote:</label>
|
||||
<div class="col-md-1 form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkMostrarLote" CssClass="chksino" Style="margin-top: -2px; background-color: #fff; line-height: 15px" data-size="small" runat="server" Text=" " OnCheckedChanged="ChkMostrarColumnas" AutoPostBack="true" />
|
||||
</div>
|
||||
<label class="col-sm-1" style="text-align: right">Mostrar Fecha:</label>
|
||||
<div class="col-md-1 form-group form-md-line-input input-iconright" >
|
||||
<asp:CheckBox ID="ChkMostrarFecha" CssClass="chksino" Style="margin-top: -2px; background-color: #fff; line-height: 15px" data-size="small" runat="server" Text=" " OnCheckedChanged="ChkMostrarColumnas" AutoPostBack="true" />
|
||||
</div>
|
||||
<label class="col-sm-1" style="text-align: right">Mostrar Sección:</label>
|
||||
<div class="col-md-1 form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkMostrarSeccion" Checked="true" CssClass="chksino" Style="margin-top: -2px; background-color: #fff; line-height: 15px" data-size="small" Text=" " runat="server" OnCheckedChanged="ChkMostrarColumnas" AutoPostBack="true" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,37 +98,37 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkLote" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nuevo Lote" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField HeaderText="Nuevo Lote" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtLote" Text='<%# Eval("Lote").ToString()%>' CssClass="form-control input-sm" ClientIDMode="Static" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEditCaducidad" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nueva Fecha Cad." ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField HeaderText="Nueva Fecha Cad." ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 113px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox runat="server" ID="TxtFechaCadNueva" Text='<%# Eval("FechaCaducidad", "{0:d}").ToString()%>' CssClass="form-control input-sm" ClientIDMode="Static" />
|
||||
<asp:TextBox runat="server" ID="TxtFechaCadNueva" Text='<%# Eval("FechaCaducidad", "{0:d}").ToString()%>' CssClass="form-control input-sm" ClientIDMode="AutoID" />
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgFecha" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaCadNueva" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFechaCadNueva" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFechaCadNueva" PopupButtonID="ImgFecha" PopupPosition="BottomLeft" Enabled="True"></ajax:CalendarExtender>
|
||||
<%--<asp:DropDownList ID="DDlS" runat="server" Width="150px" DataValueField="CveSeccionAlmacen" DataTextField="SeccionAlmacen" class="select2me"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center" >
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -533,4 +533,21 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
' row.FCTextBox("TxtCantidad").Text = ExistenciaBackup
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkMostrarColumnas(sender As Object, e As EventArgs)
|
||||
'Mostrar Lote
|
||||
GvD.Columns(7).Visible = ChkMostrarLote.Checked
|
||||
GvD.Columns(8).Visible = ChkMostrarLote.Checked
|
||||
|
||||
'Mostrar Caducidad
|
||||
GvD.Columns(9).Visible = ChkMostrarFecha.Checked
|
||||
GvD.Columns(10).Visible = ChkMostrarFecha.Checked
|
||||
|
||||
'Mostrar Sección
|
||||
GvD.Columns(11).Visible = ChkMostrarSeccion.Checked
|
||||
GvD.Columns(12).Visible = ChkMostrarSeccion.Checked
|
||||
|
||||
UppD.Update()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -191,6 +191,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div id="DivVendedor" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Vendedor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:Label ID="LblVendedor" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="DivDepartamentoEntrega" runat="server" visible="False">
|
||||
<label class="col-md-1 truncate" style="width: 110px">
|
||||
|
||||
@@ -819,6 +819,12 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
End If
|
||||
|
||||
If Mov.CveVendedor > 0 Then
|
||||
LblVendedor.Text = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", String.Format("CveVendedor = {0}", Mov.CveVendedor))
|
||||
DivVendedor.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
'carga personal
|
||||
If Mov.CvePersonal > 0 Then
|
||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, CvePersonal:=Mov.CvePersonal)
|
||||
|
||||
@@ -516,18 +516,18 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false" Text='<%# Eval("Lote") %>'></asp:TextBox>
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false" Text='<%# Eval("Lote") %>' Enabled="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="F.Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<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="TxtCaducidad" Text='<%# Eval("FechaCaducidad") %>' CssClass="form-control input-sm ADSMaskDate" Style="width: 78px" runat="server" Visible="false"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
<asp:TextBox ID="TxtCaducidad" Text='<%# Eval("FechaCaducidad") %>' CssClass="form-control input-sm ADSMaskDate" Style="width: 78px" runat="server" Visible="false" Enabled="false"></asp:TextBox>
|
||||
<span class="input-group-btn " >
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false" Enabled="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomLeft" Enabled="True" Format="dd/MM/yyyy" ></ajax:CalendarExtender>
|
||||
<ajax:CalendarExtender runat="server" Enabled="false" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomLeft" Format="dd/MM/yyyy" ></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
|
||||
</span>
|
||||
@@ -630,7 +630,7 @@
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-Width="40%" />
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" CommandName="Delete" OnClientClick="return confirm('¿Desea borrar el registro?')"></asp:LinkButton>
|
||||
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" CommandName="Delete" OnClientClick="return confirm('¿Desea borrar el registro?')"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="20%"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -270,7 +270,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
InicializaValores()
|
||||
CargaParametrosAD()
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then DdlAlmacen.AutoPostBack = True
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146, 119) Then DdlAlmacen.AutoPostBack = True
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero() = 1 Then
|
||||
|
||||
@@ -833,7 +833,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CargaGvDatos()
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGvDatos()
|
||||
Private Sub CargaGvDatos(Optional CveAlmacen As Integer = -1)
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
|
||||
@@ -849,9 +849,12 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If AplicaSeccion Then GvDatos.Columns(7).Visible = True
|
||||
If AplicaLote Then GvDatos.Columns(8).Visible = True
|
||||
If AplicaCaducidad Then GvDatos.Columns(9).Visible = True
|
||||
GvDatos.Columns(9).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
GvDatos.Columns(9).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) <> "", UsuarioActual.Empresa.Funcionalidad(147), "")
|
||||
|
||||
SugerirFechaLote()
|
||||
'SugerirFecha()
|
||||
If DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||
SugiereLoteCaducidad(DdlAlmacen.SelectedValue.ToEntero)
|
||||
End If
|
||||
End If
|
||||
GvDatos.DataSource = DtDatos
|
||||
|
||||
@@ -897,6 +900,22 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
LbCantidad.Text = e.Row.DBCampo("CantidadF")
|
||||
LbCantidad2.Text = e.Row.DBCampo("CantidadF")
|
||||
AgregaSerie(e.Row.DBCampo("ObservacionesDetalle"), 3)
|
||||
End If
|
||||
|
||||
If TipoDocto = "Ing" AndAlso e.Row.DBCampo("ObservacionesDetalle").Length > 8 AndAlso DdlAlmacen.SelectedValue.ToEntero > 0 AndAlso UsuarioActual.CveRol = 1 Then
|
||||
Dim Str = e.Row.DBCampo("ObservacionesDetalle").Replace(",", " ").Replace(".", " ").Replace(vbTab, " ").Replace(vbLf, " ").Split(" "c)
|
||||
CveConsecSerie = e.Row.DBCampo("Consec").ToString().ToEntero()
|
||||
PSSerie = e.Row.DBCampo("PS").ToString()
|
||||
CvePSSerie = e.Row.DBCampo("CvePS").ToEntero()
|
||||
CveUMSerie = e.Row.DBCampo("CveUM").ToEntero()
|
||||
LbCantidad.Text = e.Row.DBCampo("CantidadF")
|
||||
LbCantidad2.Text = e.Row.DBCampo("CantidadF")
|
||||
For Each st As String In Str
|
||||
If Not st.Contiene("", "/") Then
|
||||
AgregaSerie(st, 3)
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -1153,10 +1172,10 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim AplicaCaducidad = False
|
||||
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then
|
||||
AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False)
|
||||
End If
|
||||
Dim AplicaCaducidad As Boolean = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltroPrimeroValor("AplicaCaducidad", "") = "True"
|
||||
'If GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then
|
||||
' AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False)
|
||||
'End If
|
||||
|
||||
|
||||
'Valida Existencia
|
||||
@@ -1169,6 +1188,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
ObjInventarios.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
Else
|
||||
If DtExistencias IsNot Nothing Then
|
||||
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")
|
||||
@@ -2439,7 +2459,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()}").ToString().ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then
|
||||
ErrorMovInv = True
|
||||
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar.")
|
||||
Exit For
|
||||
@@ -3749,7 +3769,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAlmacen.SelectedIndexChanged
|
||||
If DdlAlmacen.SelectedValue <> "-1" Then
|
||||
CargaGvDatos()
|
||||
CargaGvDatos(DdlAlmacen.SelectedValue.ToEntero)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -3768,12 +3788,12 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepEntregaAlmacenSugerencia.rdlc", DtDatosSugerencias, params, "Equipo GPS")
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "TipoEntrega"
|
||||
|
||||
|
||||
Protected Sub EntregaRadioGroup_Click(sender As Object, e As EventArgs)
|
||||
If RbEntregaExterna.Checked Then
|
||||
RegistraScript($"AbrirVentana('/General/PopUpPaqueteriasGuias.aspx?CveVenta={CveVentaSurtir}',800,547,'N')")
|
||||
@@ -3821,83 +3841,68 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
#End Region
|
||||
|
||||
#Region "sugerir caducidad"
|
||||
Private Sub SugerirFechaLote()
|
||||
|
||||
Private Sub SugiereLoteCaducidad(CveAlmacen As Integer)
|
||||
Dim TempDT As New DataTable
|
||||
Dim DtLotesCaducidad As New DataTable
|
||||
TempDT = DtDatos.Clone
|
||||
Dim CvePSAnterior As Integer = 0
|
||||
Dim ObjInventarios As New ClsInventarios()
|
||||
Dim FechasExcluidas As New List(Of String)
|
||||
FechasExcluidas.Add(MinFecha.ToDate.ToString)
|
||||
Dim MaxRows As Integer = DtDatos.Rows.Count - 1
|
||||
|
||||
For contador As Integer = 0 To MaxRows
|
||||
Dim DtRow As DataRow = DtDatos.Rows(contador)
|
||||
Dim AplicaCaducidad As Boolean = DtRow.Item("AplicaCaducidad").ToString = "True"
|
||||
Dim AplicaLote As Boolean = DtRow.Item("AplicaLote").ToString = "True"
|
||||
Dim Cantidad As Integer = DtRow.Item("CantidadC").ToString.ToEntero
|
||||
Dim FechasExcluidasFiltro As String = String.Format("FechaCaducidad NOT IN('{0}')", String.Join("','", FechasExcluidas))
|
||||
If AplicaCaducidad Or AplicaLote Then
|
||||
Dim CvePS As Integer = DtRow.Item("CvePS").ToString.ToEntero
|
||||
If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
Dim MinimumRow As DataRow = ObjInventarios.DtResultados.FiltroPrimero(FechasExcluidasFiltro, "FechaCaducidad")
|
||||
DtRow.Item("FechaCaducidad") = MinimumRow.Item("FechaCaducidad").ToString
|
||||
DtRow.Item("Lote") = MinimumRow.Item("Lote").ToString
|
||||
Dim CantidadDisponible As Integer = MinimumRow.Item("Cantidad").ToString.ToEntero
|
||||
DtRow.Item("CantidadF") = CantidadDisponible
|
||||
DtRow.Item("CantidadS") = CantidadDisponible
|
||||
For Each dr As DataRow In DtDatos.Rows
|
||||
If CBool(dr("AplicaLote")) Then
|
||||
If CvePSAnterior <> dr("CvePS").ToString.ToEntero Then
|
||||
CvePSAnterior = dr("CvePS").ToString.ToEntero
|
||||
|
||||
If ObjInventarios.GetExistenciasCaducidad(dr("CvePS").ToString.ToEntero, CveAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
DtLotesCaducidad.Merge(ObjInventarios.DtResultados)
|
||||
|
||||
If Cantidad > CantidadDisponible Then
|
||||
Dim RowFaltante As DataRow = DtDatos.NewRow()
|
||||
Dim CantidadFaltante As Integer = (Cantidad - CantidadDisponible)
|
||||
RowFaltante.Item("CantidadC") = CantidadFaltante
|
||||
RowFaltante.Item("CantidadF") = CantidadFaltante
|
||||
RowFaltante.Item("CantidadS") = CantidadFaltante
|
||||
DtRow.Item("CantidadC") = CantidadDisponible
|
||||
For Each Column As DataColumn In DtDatos.Columns
|
||||
If Not Column.ColumnName.Contiene("CantidadC", "CantidadF", "CantidadS") Then
|
||||
RowFaltante.Item(Column.ColumnName) = DtRow.Item(Column.ColumnName)
|
||||
End If
|
||||
Next
|
||||
FechasExcluidas.Add(MinimumRow.Item("FechaCaducidad").ToString)
|
||||
DtDatos.Rows.Add(RowFaltante)
|
||||
MaxRows += 1
|
||||
Else
|
||||
DtRow.Item("CantidadF") = Cantidad
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
'For Each DtRow As DataRow In DtDatos.Rows
|
||||
' Dim AplicaCaducidad As Boolean = DtRow.Item("AplicaCaducidad").ToString = "True"
|
||||
' Dim AplicaLote As Boolean = DtRow.Item("AplicaLote").ToString = "True"
|
||||
' Dim Cantidad As Integer = DtRow.Item("CantidadC").ToString.ToEntero
|
||||
' Dim FechasExcluidasFiltro As String = String.Format("FechaCaducidad NOT IN('{0}')", String.Join("','", FechasExcluidas))
|
||||
' If AplicaCaducidad Or AplicaLote Then
|
||||
' Dim CvePS As Integer = DtRow.Item("CvePS").ToString.ToEntero
|
||||
' If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
' Dim MinimumRow As DataRow = ObjInventarios.DtResultados.FiltroPrimero(FechasExcluidasFiltro, "FechaCaducidad")
|
||||
' DtRow.Item("FechaCaducidad") = MinimumRow.Item("FechaCaducidad").ToString
|
||||
' DtRow.Item("Lote") = MinimumRow.Item("Lote").ToString
|
||||
' Dim CantidadDisponible As Integer = MinimumRow.Item("Cantidad").ToString.ToEntero
|
||||
' DtRow.Item("CantidadF") = CantidadDisponible
|
||||
|
||||
' If Cantidad > CantidadDisponible Then
|
||||
' Dim RowFaltante As DataRow = DtDatos.NewRow()
|
||||
' RowFaltante.Item("CantidadC") = (Cantidad - CantidadDisponible)
|
||||
' RowFaltante.Item("CantidadF") = (Cantidad - CantidadDisponible)
|
||||
' RowFaltante.Item("CantidadS") = (Cantidad - CantidadDisponible)
|
||||
' For Each Column As DataColumn In DtDatos.Columns
|
||||
' If Not Column.ColumnName.Contiene("CantidadC", "CantidadF", "CantidadS") Then
|
||||
' RowFaltante.Item(Column.ColumnName) = DtRow.Item(Column.ColumnName)
|
||||
' End If
|
||||
' Next
|
||||
|
||||
' DtDatos.Rows.Add(RowFaltante)
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
'Next
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
For Each dr As DataRow In DtDatos.Rows
|
||||
If CBool(dr("AplicaLote")) Then
|
||||
|
||||
Dim dtta As DataTable = DtLotesCaducidad.FiltraParametros(String.Format("CvePS = {0}", dr("CvePS")))
|
||||
|
||||
If dtta IsNot Nothing AndAlso dtta.Rows.Count > 0 Then
|
||||
|
||||
'recorre que cumplan con la cantidad total a llenar
|
||||
Dim CantidadSurtir As Decimal = dr("CantidadF").ToString.ToDecimal
|
||||
For Each drl As DataRow In dtta.Rows
|
||||
If CantidadSurtir < drl("Cantidad").ToString.ToDecimal Then
|
||||
dr("CantidadF") = CantidadSurtir
|
||||
dr("CantidadC") = CantidadSurtir
|
||||
dr("Lote") = drl("Lote")
|
||||
dr("FechaCaducidad") = drl("FechaCaducidad")
|
||||
TempDT.ImportRow(dr)
|
||||
CantidadSurtir = 0
|
||||
Else
|
||||
CantidadSurtir -= drl("Cantidad").ToString.ToDecimal
|
||||
dr("CantidadF") = drl("Cantidad").ToString.ToDecimal
|
||||
dr("CantidadC") = drl("Cantidad").ToString.ToDecimal
|
||||
dr("Lote") = drl("Lote")
|
||||
dr("FechaCaducidad") = drl("FechaCaducidad")
|
||||
TempDT.ImportRow(dr)
|
||||
End If
|
||||
If CantidadSurtir <= 0 Then Exit For
|
||||
Next
|
||||
|
||||
Else
|
||||
'error, no hay lote sugerido
|
||||
End If
|
||||
Else
|
||||
TempDT.ImportRow(dr)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
DtDatos = TempDT
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -92,9 +92,16 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkProyectado" OnClick="LnkProyectado_Click" Text="Cargar Proyecciones" />
|
||||
|
||||
<asp:LinkButton runat="server" ID="LnkProyectado" OnClick="LnkProyectado_Click" Text="Cargar Proyecciones" />
|
||||
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
|
||||
@@ -3362,6 +3362,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If CveMovimiento > 0 AndAlso CveMovimientoSalidaTraspaso <= 0 Then
|
||||
Msg.AppendFormat("Movimiento Registrado: Folio: <b>{0}</b>", link)
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Etiqueta Individual</a> ", Encripta(String.Format("OP=Etiqueta&CveMovimiento={0}&Modalidad={1}", CveMovimiento, "Individual")))
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Etiqueta Por Caja</a> ", Encripta(String.Format("OP=Etiqueta&CveMovimiento={0}&Modalidad={1}", CveMovimiento, "Caja")))
|
||||
'SI GENERO UN TRASPASO AL ALMACEN DE DEVOLUCION
|
||||
ElseIf CveMovimiento > 0 AndAlso CveMovimientoSalidaTraspaso > 0 Then
|
||||
Msg.AppendFormat("Movimiento de Salida: Folio: <b>{0}</b>", String.Format("<a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimientoSalidaTraspaso, FolioSalidaTraspaso))
|
||||
|
||||
@@ -189,6 +189,7 @@
|
||||
<asp:BoundField HeaderText="Cantidad Solicitada" DataField="CantidadC" DataFormatString="{0:#,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Cantidad Restante" DataField="CantidadF" DataFormatString="{0:#,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Proveedor/Producto ó Servicio" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Centro Costo" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:#,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:TemplateField ItemStyle-Width="70px" HeaderText="Acción" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -72,9 +72,9 @@ Partial Class RepNotasSinAlmacen
|
||||
Private Sub CargaPermisos()
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
Dim TienePermisoDesmarcar As Boolean = UsuarioActual.TienePermisoProceso(278)
|
||||
GvVentas.Columns(4).Visible = TienePermisoImportes
|
||||
GvCompras.Columns(3).Visible = TienePermisoImportes
|
||||
GvCompras.Columns(4).Visible = TienePermisoDesmarcar
|
||||
GvVentas.Columns(5).Visible = TienePermisoImportes
|
||||
GvCompras.Columns(4).Visible = TienePermisoImportes
|
||||
GvCompras.Columns(5).Visible = TienePermisoDesmarcar
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
TxtFechaF.Text = Date.Now.ToShortDateString
|
||||
|
||||
@@ -8334,7 +8334,7 @@ Partial Class OC
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida")
|
||||
Dim UMAbreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
|
||||
Dim SubProyecto As Integer = GvRow.DataKey("SubProyecto")
|
||||
Dim SubProyecto As String = GvRow.DataKey("SubProyecto")
|
||||
Dim CveSubProyecto As Integer = GvRow.DataKey("CveSubProyecto").ToEntero
|
||||
Dim Codigo As String = "" 'GvRow.DataKey("Codigo")
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<%@ WebHandler Language="C#" Class="TareasJam" %>
|
||||
|
||||
using System;
|
||||
using System.Web;
|
||||
<%@ WebHandler Language="C#" Class="TareasJam" %>
|
||||
|
||||
using System;
|
||||
using System.Web;
|
||||
using Extensiones;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
@@ -9,46 +9,49 @@ using System.Web.Services;
|
||||
using System.Web.Services.Protocols;
|
||||
using GemBox.Spreadsheet;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using ClosedXML;
|
||||
|
||||
public class TareasJam : IHttpHandler
|
||||
{
|
||||
|
||||
public void ProcessRequest(HttpContext context)
|
||||
{
|
||||
context.Response.ContentType = "text/plain";
|
||||
//context.Response.Write("Hello World");
|
||||
bool retorno = false;
|
||||
string Metodo = context.Request["Metodo"] ==null?"": context.Request["Metodo"];
|
||||
int CveEmpresa =context.Request["CveEmpresa"] ==null?0: context.Request["CveEmpresa"].ToEntero();
|
||||
switch (Metodo)
|
||||
using ClosedXML;
|
||||
|
||||
public class TareasJam : IHttpHandler
|
||||
{
|
||||
|
||||
public void ProcessRequest(HttpContext context)
|
||||
{
|
||||
context.Response.ContentType = "text/plain";
|
||||
//context.Response.Write("Hello World");
|
||||
bool retorno = false;
|
||||
string Metodo = context.Request["Metodo"] ==null?"": context.Request["Metodo"];
|
||||
int CveEmpresa =context.Request["CveEmpresa"] ==null?0: context.Request["CveEmpresa"].ToEntero();
|
||||
switch (Metodo)
|
||||
{
|
||||
case "TestConexion":
|
||||
retorno = PruebaConexionFTP("ftp://us2.hostedftp.com/", "agrojam", "A12345678");
|
||||
break;
|
||||
case "EjecutaThalamus":
|
||||
retorno =EjecutaThalamus(CveEmpresa);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (retorno)
|
||||
{
|
||||
context.Response.Write("True");
|
||||
|
||||
}else
|
||||
{
|
||||
context.Response.Write("False");
|
||||
|
||||
}
|
||||
case "EjecutaThalamus":
|
||||
retorno =EjecutaThalamus(CveEmpresa);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (retorno)
|
||||
{
|
||||
context.Response.Write("True");
|
||||
|
||||
}else
|
||||
{
|
||||
context.Response.Write("False");
|
||||
|
||||
}
|
||||
context.Response.End();
|
||||
|
||||
}
|
||||
private bool EjecutaThalamus(int CveEmpresa)
|
||||
{
|
||||
|
||||
|
||||
this.GuardaLog("EjecutaThalamus: Inicio. ");
|
||||
|
||||
bool Respuesta = false;
|
||||
StringBuilder SBLog = new StringBuilder();
|
||||
|
||||
@@ -96,6 +99,7 @@ public class TareasJam : IHttpHandler
|
||||
}
|
||||
catch (Exception ex) {
|
||||
SBLog.AppendLine("<b>Error al eliminar archivos</b>");
|
||||
this.GuardaLog("EjecutaThalamus: Error Eliminado arrchivo " + ex.Message + " ");
|
||||
}
|
||||
|
||||
|
||||
@@ -113,46 +117,60 @@ public class TareasJam : IHttpHandler
|
||||
SBLog.AppendLine("<b>Consultas</b><br>");
|
||||
SBLog.AppendLine("<table border='1'><tr><th>Consulta</th><th>Registros</th></tr>");
|
||||
|
||||
|
||||
|
||||
this.GuardaLog("EjecutaThalamus: Consultando Prodcutos. ");
|
||||
if (ObjGenerales.GetJAMCorveta(1))
|
||||
{
|
||||
DTProductos = ObjGenerales.DtResultados.Copy();
|
||||
SBLog.AppendLine($"<tr><td>Productos</td><td>{DTProductos.Rows.Count}</td></tr>");
|
||||
this.GuardaLog($"EjecutaThalamus: Consultando Prodcutos correcto {DTProductos.Rows.Count} registros. ");
|
||||
}
|
||||
else {
|
||||
ErrorProceso = true;
|
||||
SBLog.AppendLine($"<tr><td>Productos</td><td>Error al consultar</td></tr>");
|
||||
this.GuardaLog($"EjecutaThalamus: Consultando Prodcutos Error. ");
|
||||
}
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: Consultando Ventas. ");
|
||||
if (ObjGenerales.GetJAMCorveta(2) & ErrorProceso == false)
|
||||
{
|
||||
DTVentas = ObjGenerales.DtResultados.Copy();
|
||||
SBLog.AppendLine($"<tr>Ventas<td></td><td>{DTVentas.Rows.Count}</td></tr>");
|
||||
this.GuardaLog($"EjecutaThalamus: Consultando Ventas correcto {DTVentas.Rows.Count} registros. ");
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorProceso = true;
|
||||
SBLog.AppendLine($"<tr><td>Ventas</td><td>Error al consultar</td></tr>");
|
||||
this.GuardaLog($"EjecutaThalamus: Consultando Ventas Error. ");
|
||||
}
|
||||
|
||||
if (ObjGenerales.GetJAMCorveta(3) & ErrorProceso == false)
|
||||
this.GuardaLog($"EjecutaThalamus: Consultando Clientes. ");
|
||||
if (ObjGenerales.GetJAMCorveta(3) & ErrorProceso == false)
|
||||
{
|
||||
DTClientes = ObjGenerales.DtResultados.Copy();
|
||||
SBLog.AppendLine($"<tr><td>Clientes</td><td>{DTClientes.Rows.Count}</td></tr>");
|
||||
this.GuardaLog($"EjecutaThalamus: Consultando Clientes correco {DTClientes.Rows.Count} registros. ");
|
||||
|
||||
}
|
||||
else {
|
||||
ErrorProceso = true;
|
||||
SBLog.AppendLine($"<tr><td>Clientes</td><td>Error al consultar</td></tr>");
|
||||
this.GuardaLog($"EjecutaThalamus: Consultando Clientes Error. ");
|
||||
}
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: Consultando Almacenes. ");
|
||||
if (ObjGenerales.GetJAMCorveta(4) & ErrorProceso == false)
|
||||
{
|
||||
DTAlmacenes = ObjGenerales.DtResultados.Copy();
|
||||
SBLog.AppendLine($"<tr><td>Almacenes</td><td>{DTAlmacenes.Rows.Count}</td></tr>");
|
||||
this.GuardaLog($"EjecutaThalamus: Consultando Almacenes Correcto {DTAlmacenes.Rows.Count} registros. ");
|
||||
}
|
||||
else {
|
||||
ErrorProceso = true;
|
||||
SBLog.AppendLine($"<tr><td>Almacenes</td><td>Error al consultar</td></tr>");
|
||||
this.GuardaLog($"EjecutaThalamus: Consultando Almacenes Error. ");
|
||||
}
|
||||
|
||||
SBLog.AppendLine("</table>");
|
||||
@@ -166,12 +184,14 @@ public class TareasJam : IHttpHandler
|
||||
try
|
||||
{
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: Renombrando columnas tabla productos. ");
|
||||
DTProductos.Columns[0].ColumnName = "Código Producto Interno";
|
||||
DTProductos.Columns[1].ColumnName = "Nombre del Producto";
|
||||
DTProductos.Columns[2].ColumnName = "Presentación";
|
||||
DTProductos.AcceptChanges();
|
||||
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: Renombrando columnas tabla clientes. ");
|
||||
DTClientes.Columns[4].ColumnName = "address.countryId";
|
||||
DTClientes.Columns[5].ColumnName = "address.stateId";
|
||||
DTClientes.Columns[6].ColumnName = "address.city";
|
||||
@@ -189,6 +209,8 @@ public class TareasJam : IHttpHandler
|
||||
//DTClientes.Columns.RemoveAt(7);
|
||||
DTClientes.AcceptChanges();
|
||||
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: Renombrando columnas tabla ventas. ");
|
||||
DTVentas.Columns.RemoveAt(7);
|
||||
//DTVentas.Columns.RemoveAt(6);
|
||||
|
||||
@@ -197,13 +219,14 @@ public class TareasJam : IHttpHandler
|
||||
DTVentas.AcceptChanges();
|
||||
|
||||
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: Renombrando columnas tabla almacenes. ");
|
||||
DTAlmacenes.Columns[2].ColumnName = "Description";
|
||||
DTAlmacenes.Columns[3].ColumnName = "Stock Date";
|
||||
DTAlmacenes.AcceptChanges();
|
||||
|
||||
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: procesando tabla de ventas DTVentas.Clone() para asiganación de tipo de dato fecha. ");
|
||||
DataTable dtCloned = DTVentas.Clone();
|
||||
dtCloned.Columns[3].DataType = typeof(DateTime);
|
||||
|
||||
@@ -221,7 +244,7 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
DTVentas.AcceptChanges();
|
||||
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: procesando tabla de ventas DTAlmacenes.Clone() para asiganación de tipo de dato fecha. ");
|
||||
dtCloned = DTAlmacenes.Clone();
|
||||
dtCloned.Columns[3].DataType = typeof(DateTime);
|
||||
|
||||
@@ -242,6 +265,7 @@ public class TareasJam : IHttpHandler
|
||||
catch (Exception e)
|
||||
{
|
||||
SBLog.AppendLine("<b>Error al renombrar columnas</b>");
|
||||
this.GuardaLog($"EjecutaThalamus: Error procesamiento de tablas " + e.StackTrace.ToString() + " ");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,6 +274,8 @@ public class TareasJam : IHttpHandler
|
||||
if (!ErrorProceso)
|
||||
{
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel ventas. ");
|
||||
int count = 2;
|
||||
var wbVentas = new ClosedXML.Excel.XLWorkbook(FormatoVentas);
|
||||
var wsVentas = wbVentas.Worksheet(1);
|
||||
@@ -259,12 +285,13 @@ public class TareasJam : IHttpHandler
|
||||
wsVentas.Cell(count, 1).Value = "'" + DRow["systemId"].ToString();
|
||||
wsVentas.Cell(count, 2).Value = DRow["Branch"].ToString();
|
||||
wsVentas.Cell(count, 3).Value = "'" + DRow["Code"].ToString();
|
||||
wsVentas.Cell(count, 4).Value = DRow["Sale Date"].ToString();
|
||||
wsVentas.Cell(count, 4).Value = DRow["Sale Date"].ToString();
|
||||
wsVentas.Cell(count, 5).Value = DRow["Quantity"].ToString();
|
||||
wsVentas.Cell(count, 6).Value = DRow["Amount"].ToString();
|
||||
wsVentas.Cell(count, 7).Value = DRow["Transaction ID"].ToString();
|
||||
count++;
|
||||
}
|
||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel ventas " + RutaVentas + " ");
|
||||
wbVentas.SaveAs(RutaVentas);
|
||||
|
||||
var wbAlmacenes = new ClosedXML.Excel.XLWorkbook(FormatoAlmacenes);
|
||||
@@ -272,14 +299,16 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
count = 2;
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel almacenes. ");
|
||||
foreach (DataRow DRow in DTAlmacenes.Rows)
|
||||
{
|
||||
wsAlmacenes.Cell(count, 1).Value = "'" + DRow["Code"].ToString();
|
||||
wsAlmacenes.Cell(count, 2).Value = DRow["Quantity"].ToString();
|
||||
wsAlmacenes.Cell(count, 3).Value = DRow["Description"].ToString();
|
||||
wsAlmacenes.Cell(count, 4).Value = DRow["Stock Date"].ToString();
|
||||
wsAlmacenes.Cell(count, 4).Value = DRow["Stock Date"].ToString();
|
||||
count++;
|
||||
}
|
||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel alamcenes " + RutaAlmacenes + " ");
|
||||
wbAlmacenes.SaveAs(RutaAlmacenes);
|
||||
|
||||
var wbAClientes = new ClosedXML.Excel.XLWorkbook(FormatoClientes);
|
||||
@@ -287,6 +316,7 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
count = 2;
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel clientes. ");
|
||||
foreach (DataRow DRow in DTClientes.Rows)
|
||||
{
|
||||
wsClientes.Cell(count, 1).Value = "'" + DRow["systemId"].ToString();
|
||||
@@ -306,13 +336,15 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
count++;
|
||||
}
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel clientes " + RutaClientes + " ");
|
||||
wbAClientes.SaveAs(RutaClientes);
|
||||
|
||||
var wbProductos= new ClosedXML.Excel.XLWorkbook(FormatoProductos);
|
||||
var wsProductos = wbProductos.Worksheet(1);
|
||||
|
||||
count = 2;
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel productos. ");
|
||||
foreach (DataRow DRow in DTProductos.Rows)
|
||||
{
|
||||
wsProductos.Cell(count, 1).Value = "'" + DRow["Código Producto Interno"].ToString();
|
||||
@@ -321,6 +353,7 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
count++;
|
||||
}
|
||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel productos " + RutaProductos + " ");
|
||||
wbProductos.SaveAs(RutaProductos);
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -337,10 +370,13 @@ public class TareasJam : IHttpHandler
|
||||
SBLog.AppendLine("<b>Cargas</b><br>");
|
||||
SBLog.AppendLine("<table border='1'> <tr><th>Archivo</th><th>Estado</th></tr>");
|
||||
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel productos a FTP. ");
|
||||
CargaProductos = CargarArchivos(FInfoProductos, FTPServer, TFPUsr, FTPPass);
|
||||
|
||||
if (CargaProductos)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo productos. ");
|
||||
CargaProductos = VerificarArchivo(FInfoProductos, FInfoProductos.Length, FTPServer, TFPUsr, FTPPass);
|
||||
}
|
||||
|
||||
@@ -355,9 +391,11 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
if (CargaProductos)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel ventas a FTP. ");
|
||||
CargaVentas = CargarArchivos(FInfoVentas, $"{FTPServer}/Ventas", TFPUsr, FTPPass);
|
||||
if (CargaVentas)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo ventas. ");
|
||||
CargaVentas = VerificarArchivo(FInfoVentas, FInfoVentas.Length, $"{FTPServer}/Ventas", TFPUsr, FTPPass);
|
||||
}
|
||||
}
|
||||
@@ -373,9 +411,11 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
if (CargaProductos & CargaVentas)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel clientes a FTP. ");
|
||||
CargaClientes = CargarArchivos(FInfoClientes, $"{FTPServer}/Clientes", TFPUsr, FTPPass);
|
||||
if (CargaClientes)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo clientes. ");
|
||||
CargaClientes = VerificarArchivo(FInfoClientes, FInfoClientes.Length, $"{FTPServer}/Clientes", TFPUsr, FTPPass);
|
||||
}
|
||||
}
|
||||
@@ -391,9 +431,11 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
if (CargaProductos & CargaVentas & CargaClientes)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel almacenes a FTP. ");
|
||||
CargaAlmacenes = CargarArchivos(FInfoAlmacenes, $"{FTPServer}/Stock", TFPUsr, FTPPass);
|
||||
if (CargaClientes)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo almacenes. ");
|
||||
CargaAlmacenes = VerificarArchivo(FInfoAlmacenes, FInfoAlmacenes.Length, $"{FTPServer}/Stock", TFPUsr, FTPPass);
|
||||
}
|
||||
}
|
||||
@@ -429,8 +471,10 @@ public class TareasJam : IHttpHandler
|
||||
string Cuerpo = Respuesta ? $"<b>Correcto</b><br>Tarea de carga de archios Corteva realizada correctamente<br> {SBLog.ToString()}" : $"<b>Error</b><br> Error tarea de carga de archios Corteva<br> {SBLog.ToString()}" ;
|
||||
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: Enviado correo. ");
|
||||
MandaCorreo(Cuerpo, Respuesta, RutaProductos, RutaVentas, RutaClientes, RutaAlmacenes);
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: Tarea terminada se regresa respuesta {Respuesta.ToString()}. ");
|
||||
return Respuesta;
|
||||
|
||||
}
|
||||
@@ -461,15 +505,17 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
|
||||
ClsSisMail Correo = new ClsSisMail();
|
||||
string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
|
||||
//string Para = "oscar.irigoyen@adssistemas.mx";
|
||||
string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
|
||||
// string Para = "oscar.irigoyen@adssistemas.mx";
|
||||
string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}";
|
||||
|
||||
Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo, Archivos:ListaArchivos);
|
||||
this.GuardaLog($"EjecutaThalamus: MandaCorreo() correo enviado. ");
|
||||
|
||||
}catch(Exception ex)
|
||||
{
|
||||
Extensiones.ModExtensiones.GuardaLog(null,$"Error Tareas Programadas 119 error enviar mail --> {ex.Message} ");
|
||||
this.GuardaLog($"EjecutaThalamus: MandaCorreo() Error {ex.StackTrace.ToString()}. ");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -480,6 +526,8 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
if (FInfo.Exists)
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: CargarArchivos() Conectando a TFP. ");
|
||||
|
||||
FtpWebRequest request = (FtpWebRequest)WebRequest.Create($"{FTPServer}/{FInfo.Name}");
|
||||
request.Method = WebRequestMethods.Ftp.UploadFile;
|
||||
int tamanio = 1024;
|
||||
@@ -491,10 +539,12 @@ public class TareasJam : IHttpHandler
|
||||
{
|
||||
request.GetResponse();
|
||||
Conected = true;
|
||||
this.GuardaLog($"EjecutaThalamus: CargarArchivos() conexión a TFP correcta. ");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Extensiones.ModExtensiones.GuardaLog(null,$"Error Tareas Programadas 119 Conexión a servidor FTP archivo { FInfo.Name } {ex.Message} ");
|
||||
this.GuardaLog($"EjecutaThalamus: CargarArchivos() FTP Error Tareas Programadas 119 Conexión a servidor FTP archivo { FInfo.Name } {ex.Message}. ");
|
||||
}
|
||||
|
||||
if (Conected)
|
||||
@@ -517,16 +567,20 @@ public class TareasJam : IHttpHandler
|
||||
{
|
||||
Respuesta = false;
|
||||
Extensiones.ModExtensiones.GuardaLog(null,$"Error Tareas Programadas 119 cargando archivo { FInfo.Name } {ex.Message} ");
|
||||
this.GuardaLog($"EjecutaThalamus: CargarArchivos() Conectando a TFP Error Tareas Programadas 119 cargando archivo { FInfo.Name } {ex.Message}. ");
|
||||
}
|
||||
|
||||
|
||||
if (f is object)
|
||||
{
|
||||
f.Close();
|
||||
}
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: CargarArchivos() TFP cerrrando conxión. ");
|
||||
if (ftpStream is object)
|
||||
{
|
||||
ftpStream.Close();
|
||||
this.GuardaLog($"EjecutaThalamus: CargarArchivos() TFP conxión cerrada. ");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -553,6 +607,7 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
try
|
||||
{
|
||||
this.GuardaLog($"EjecutaThalamus: VerificarArchivo() conectando a FTP .");
|
||||
FtpWebRequest request = (FtpWebRequest)WebRequest.Create($"{FTPServer}/{FInfo.Name}");
|
||||
request.Credentials = new NetworkCredential(FTPUsr, FTPPass);
|
||||
request.Method = WebRequestMethods.Ftp.GetFileSize;
|
||||
@@ -562,14 +617,20 @@ public class TareasJam : IHttpHandler
|
||||
respSize = (FtpWebResponse)request.GetResponse();
|
||||
long size = respSize.ContentLength;
|
||||
respSize.Close();
|
||||
|
||||
this.GuardaLog($"EjecutaThalamus: VerificarArchivo() tamaño local {Tamanio} ftp { size}. ");
|
||||
if (Tamanio == size)
|
||||
{
|
||||
Respuesta = true;
|
||||
this.GuardaLog($"EjecutaThalamus: VerificarArchivo() tamaño ok. ");
|
||||
}
|
||||
|
||||
}catch(Exception ex)
|
||||
{
|
||||
|
||||
Extensiones.ModExtensiones.GuardaLog(null,$"Error Tareas Programadas 119 verificando archivo { FInfo.Name } {ex.Message} ");
|
||||
this.GuardaLog($"EjecutaThalamus: VerificarArchivo() Error {ex.StackTrace.ToString()}. " );
|
||||
|
||||
Respuesta = false;
|
||||
}
|
||||
|
||||
@@ -592,7 +653,7 @@ public class TareasJam : IHttpHandler
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Extensiones.ModExtensiones.GuardaLog(null, $"Error Tareas Programadas 119 error Prueba de Conexión a servidor FTP archivo {ex.Message} ");
|
||||
Extensiones.ModExtensiones.GuardaLog(null, $"Error Tareas Programadas 119 error Prueba de Conexión a servidor FTP archivo {ex.Message}. ");
|
||||
}
|
||||
|
||||
return Respuesta;
|
||||
@@ -603,6 +664,6 @@ public class TareasJam : IHttpHandler
|
||||
public bool IsReusable
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2866,44 +2866,37 @@ Partial Class ProductosyServicios
|
||||
End Function
|
||||
|
||||
Private Function GuardarProductosEquivalenteEnFranquicia(ObjPS As ClsProductosServicios, Agregar As Boolean) As Boolean
|
||||
Dim EmpresasFranquicia = ObtenerFranquiciasInt()
|
||||
For Each Franquicia As Integer In EmpresasFranquicia
|
||||
Dim CvePSPagina As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", TxtCodigo.Text.Trim)).ToEntero
|
||||
Dim CvePSAdicional As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", DdlPSAdicional.SelectedItem.Text)).ToEntero
|
||||
If UsuarioActual.Empresa.Funcionalidad(563) <> "" Then
|
||||
|
||||
If CvePSPagina <= 0 Then
|
||||
Alert(String.Format("El producto de la página no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Dim StrEmpresas As String = UsuarioActual.Empresa.Funcionalidad(563)
|
||||
Dim EmpresasFranquicia As List(Of Integer) = StrEmpresas.Split(","c).ToList().ConvertAll(Function(x) Convert.ToInt32(x))
|
||||
For Each Franquicia As Integer In EmpresasFranquicia
|
||||
Dim CvePSPagina As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", TxtCodigo.Text.Trim)).ToEntero
|
||||
Dim CvePSAdicional As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", DdlPSAdicional.SelectedItem.Text)).ToEntero
|
||||
|
||||
If CvePSPagina <= 0 Then
|
||||
Alert(String.Format("El producto adicional no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If Agregar Then
|
||||
If Not ObjPS.AddPSAdicionales(CvePSPagina, CvePSAdicional, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||
Return True
|
||||
If CvePSPagina <= 0 Then
|
||||
Alert(String.Format("El producto de la página no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
Dim PSAnterior As String = GlobalDTPS(Franquicia).FiltroPrimeroValor("PS", String.Format("CvePS = '{0}'", CvePSAdicional))
|
||||
Dim CvePSAnterio As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", PSAnterior)).ToEntero
|
||||
|
||||
If Not ObjPS.UpdatePSAdicionales(CvePSPagina, CvePSAdicional, CvePSAnterio, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||
Return True
|
||||
If CvePSPagina <= 0 Then
|
||||
Alert(String.Format("El producto adicional no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If Agregar Then
|
||||
If Not ObjPS.AddPSAdicionales(CvePSPagina, CvePSAdicional, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||
Return True
|
||||
End If
|
||||
Else
|
||||
Dim PSAnterior As String = GlobalDTPS(Franquicia).FiltroPrimeroValor("PS", String.Format("CvePS = '{0}'", CvePSAdicional))
|
||||
Dim CvePSAnterio As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", PSAnterior)).ToEntero
|
||||
|
||||
If Not ObjPS.UpdatePSAdicionales(CvePSPagina, CvePSAdicional, CvePSAnterio, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function ObtenerFranquiciasInt() As Integer()
|
||||
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(137)
|
||||
Dim Franquicias = FranquiciasStr.Split(","c)
|
||||
Dim ReturnFranquicias(Franquicias.Length) As Integer
|
||||
Dim Contador As Integer = 0
|
||||
For Each Franquicia In Franquicias
|
||||
ReturnFranquicias(Contador) = Franquicia.ToEntero
|
||||
Contador += 1
|
||||
Next
|
||||
Return ReturnFranquicias
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@@ -84,6 +84,13 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1" >Esquema Nuevo:</div>
|
||||
<div class="col-md-2" style="vertical-align:bottom;align-items:initial">
|
||||
<asp:CheckBox runat="server" ID ="ChkEsquemaNuevo" CssClass="md-checksd" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -66,7 +66,7 @@ public partial class Ventas_RepComisionesJAM : ClsPaginas
|
||||
|
||||
GvDatos.Columns[15].Visible = UsuarioActual.TienePermisoProceso(201);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void Consulta()
|
||||
{
|
||||
@@ -108,18 +108,26 @@ public partial class Ventas_RepComisionesJAM : ClsPaginas
|
||||
else if (e.Row.DBCampo("CveVenta").ToEntero() < 1)
|
||||
{
|
||||
e.Row.CssClass = "SubTotales2";
|
||||
//e.Row.Cells[0].Text = e.Row.DBCampo("Vendedor").ToString();
|
||||
//e.Row.Cells[0].Text = e.Row.DBCampo("Vendedor").ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (e.Row.DBCampo("Transaccion").ToString() == "Pago")
|
||||
{
|
||||
if (e.Row.DBCampo("CveCategoria").ToEntero() < 1)
|
||||
{
|
||||
if (UsuarioActual.TienePermisoProceso(201))
|
||||
{
|
||||
e.Row.Cells[21].ToolTip = "No se encuentra dentro de alguna categoria especificada.";
|
||||
e.Row.Cells[22].ToolTip = "No se encuentra dentro de alguna categoria especificada.";
|
||||
else
|
||||
{
|
||||
if (e.Row.DBCampo("Transaccion").ToString() == "Pago")
|
||||
{
|
||||
if (e.Row.DBCampo("CveCategoria").ToEntero() < 1 && e.Row.DBCampo("Comision").ToDouble() == 0)
|
||||
{
|
||||
//if (UsuarioActual.TienePermisoProceso(201))
|
||||
//{
|
||||
// e.Row.Cells[21].ToolTip = "No se encuentra dentro de alguna categoria que de comision ni a alguno de los productos especiales.";
|
||||
// e.Row.Cells[22].ToolTip = "No se encuentra dentro de alguna categoria que de comision ni a alguno de los productos especiales.";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
e.Row.Cells[21].ToolTip = "No se encuentra dentro de alguna categoria que de comision ni a alguno de los productos especiales.";
|
||||
e.Row.Cells[22].ToolTip = "No se encuentra dentro de alguna categoria que de comision ni a alguno de los productos especiales.";
|
||||
//}
|
||||
}else if (e.Row.DBCampo("CveCategoria").ToEntero() > 0 )
|
||||
{
|
||||
e.Row.Cells[21].ToolTip = $"El producto obtuvo la comision porque se encuentra en la categoria: {get_GlobalDTGralCategorias(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Categoria",$"CveCategoria = {e.Row.DBCampo("CveCategoria").ToString()}")}.";
|
||||
e.Row.Cells[22].ToolTip = $"El producto obtuvo la comision porque se encuentra en la categoria: {get_GlobalDTGralCategorias(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Categoria", $"CveCategoria = {e.Row.DBCampo("CveCategoria").ToString()}")}.";
|
||||
}else if(e.Row.DBCampo("Comision").ToDouble() > 0)
|
||||
|
||||
@@ -2743,8 +2743,17 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<div id="DivEstimaciones" runat="server" visible="true">
|
||||
Contrato:
|
||||
<asp:DropDownList ID="DdlContrato" runat="server" AppendDataBoundItems="true" Width="350px" AutoPostBack="true" DataTextField="NumeroContrato" DataValueField="CveContrato"></asp:DropDownList>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Contrato:</td>
|
||||
<td><asp:DropDownList ID="DdlContrato" runat="server" AppendDataBoundItems="true" Width="350px" AutoPostBack="true" DataTextField="NumeroContrato" DataValueField="CveContrato" CssClass="select2me" ></asp:DropDownList></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:HyperLink ID="HLContrato" Target="_blank" CssClass="Texto" runat="server" Text="" Font-Bold="true"></asp:HyperLink>
|
||||
<asp:GridView ID="GvEst" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Estimaciones para este cliente" Width="100%" DataKeyNames="CveContrato,CveFamilias,CveSubFamilias,CveContratoAvance,Name,Importe,NumeroContrato,CveSubProyecto,FechaInicial" SelectedRowStyle-BackColor="#CCFF66" CssClass="table GvEst table-advance table-hover" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
@@ -2781,13 +2790,22 @@
|
||||
|
||||
<div id="ContratoDetalles" class="row" runat="server" visible="false">
|
||||
<div class="col-md-12">
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-1">
|
||||
<asp:Label runat="server" Text="Contrato:"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<asp:DropDownList runat="server" ID="DdlContratosModal" AutoPostBack="true" CssClass=" form-control input-sm select2me text-left" Width="400px" DataTextField="ContratoCompleto" DataValueField="CveContrato" />
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
|
||||
<div class="col-md-6">
|
||||
<table>
|
||||
<tr>
|
||||
<td><asp:Label runat="server" Text="Contrato:"></asp:Label></td>
|
||||
<td><asp:DropDownList runat="server" ID="DdlContratosModal" AutoPostBack="true" CssClass=" form-control input-sm select2me text-left" Width="400px" DataTextField="ContratoCompleto" DataValueField="CveContrato" /></td>
|
||||
</tr>
|
||||
<tr runat="server" id="DVEstimacionesObra" visible="false">
|
||||
<td> Estimacion:</td>
|
||||
<td> <asp:DropDownList ID="DdlEstimacionesObra" runat="server" AppendDataBoundItems="true" Width="400px" AutoPostBack="true" DataTextField="NumeroEstimacion" DataValueField="CveEstimacion" CssClass="select2me"></asp:DropDownList> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6 display4 bold" style="font-size: 16px;">
|
||||
Saldo: $<asp:Literal Text="" ID="LtContratoImporteSaldo" runat="server" />
|
||||
</div>
|
||||
@@ -2801,6 +2819,7 @@
|
||||
<asp:ListItem Text="Venta" Value="2" Selected="True" />
|
||||
<asp:ListItem Text="Suministro" Value="1" />
|
||||
<%--<asp:ListItem Text="Consignación" Value="3" Enabled="false" />--%>
|
||||
<asp:ListItem Text="Obra" Value="4" />
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -4295,6 +4314,7 @@
|
||||
<asp:RadioButtonList ID="RblOpcionContrato" runat="server" CssClass="rbl" RepeatDirection="Horizontal" RepeatLayout="Table">
|
||||
<asp:ListItem Text="Si" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="1"></asp:ListItem>
|
||||
|
||||
</asp:RadioButtonList>
|
||||
|
||||
<asp:LinkButton ID="BtnIniciarContrato" runat="server" CssClass="btn btn-success" Text="Aceptar" />
|
||||
@@ -7910,7 +7930,7 @@
|
||||
$get('HdnTotalVenta').value = FormatoNumero(totalVenta, 2);
|
||||
}
|
||||
|
||||
function chkAnt(t, txt, importe) {
|
||||
function chkAnt(t, txt, importe, AmorContrato = 0) {
|
||||
debugger;
|
||||
var totalAnt = 0;
|
||||
|
||||
@@ -7927,6 +7947,8 @@
|
||||
|
||||
if (SaldoCompra > 0) {
|
||||
|
||||
|
||||
|
||||
//if (SaldoCompra > importe) {
|
||||
// txt.value = importe.toFixed(2);
|
||||
// SaldoCompra = SaldoCompra - importe;
|
||||
@@ -7937,7 +7959,14 @@
|
||||
// //SaldoCompra = 0.00;
|
||||
// $get('HdnVentaSaldo').value = SaldoCompra;
|
||||
//}
|
||||
txt.value = importe.toFixed(2);
|
||||
|
||||
if(AmorContrato > 0){
|
||||
txt.value = AmorContrato.toFixed(2);
|
||||
}else{
|
||||
txt.value = importe.toFixed(2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
totalAnt = FnSumaValoresAnt();
|
||||
|
||||
|
||||
@@ -1314,6 +1314,7 @@ Partial Class Ventas
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades Contratos"
|
||||
|
||||
Private Property DtContratos As DataTable
|
||||
Get
|
||||
Return If(IsNothing(ViewState("DtContratos")), Nothing, CType(ViewState("DtContratos"), DataTable))
|
||||
@@ -1403,6 +1404,59 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property PorAmortizacionAnticipo As Integer
|
||||
Get
|
||||
|
||||
If ViewState("PorAmortizacionAnticipo") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return CType(ViewState("PorAmortizacionAnticipo"), Integer)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("PorAmortizacionAnticipo") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Private Property AmortizacionSujeridaContrato As Decimal
|
||||
Get
|
||||
|
||||
If ViewState("AmortizacionSujeridaContrato") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return ViewState("AmortizacionSujeridaContrato").ToString.ToDecimal
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("AmortizacionSujeridaContrato") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property EscontratoObra As Boolean
|
||||
Get
|
||||
If ViewState("EscontratoObra") Is Nothing Then
|
||||
Return False
|
||||
Else
|
||||
Return Boolean.Parse(ViewState("EscontratoObra").ToString)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("EscontratoObra") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " PROPIEDADES NUEVAS | GUARDAR - IMPRESION "
|
||||
@@ -1454,6 +1508,14 @@ Partial Class Ventas
|
||||
ViewState("ObjFacturaNC") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " PROPIEDADES NUEVAS "
|
||||
@@ -3030,7 +3092,13 @@ Partial Class Ventas
|
||||
TieneContrato = True
|
||||
LnkOCs.Visible = True
|
||||
UpnTools.Update()
|
||||
|
||||
|
||||
|
||||
Else
|
||||
BtnEstimacion.Visible = True
|
||||
GvEst.Visible = True
|
||||
|
||||
DdlContratosOC.Items.Clear()
|
||||
DdlContratosOC.DataSource = DtContratos
|
||||
DdlContratosOC.DataBind()
|
||||
@@ -3071,6 +3139,19 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DrContrato("CveContratoTipo").ToString.ToEntero.Contiene(30, 31) Then
|
||||
PorAmortizacionAnticipo = DrContrato("PorAmortizacionAnticipo").ToString.ToEntero
|
||||
EscontratoObra = True
|
||||
Else
|
||||
PorAmortizacionAnticipo = 0
|
||||
EscontratoObra = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
LbContratoImporteTotal.Text = DrContrato("ImporteTotal").ToString().FormatoNumero
|
||||
LbContratoImporteMinimo.Text = DrContrato("ImporteMin").ToString().FormatoNumero
|
||||
LbContratoImporteMaximo.Text = DrContrato("ImporteMax").ToString().FormatoNumero
|
||||
@@ -3214,6 +3295,7 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Cot"))
|
||||
End If
|
||||
|
||||
DVEstimacionesObra.Visible = False
|
||||
Select Case RBLTipoContrato.SelectedValue.ToEntero()
|
||||
Case 1
|
||||
DdlTipoComprobante.Items.Insert(0, New ListItem("Pedido", "Ped"))
|
||||
@@ -3226,7 +3308,35 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.Items.Insert(0, New ListItem("Pedido de Consignación", "PeC"))
|
||||
DdlTipoComprobante.SelectedValue = "PeC"
|
||||
DdlTipoComprobante.Enabled = False
|
||||
|
||||
Case 4
|
||||
|
||||
TabGenerales.Enabled = True
|
||||
DVEstimacionesObra.Visible = True
|
||||
DdlEstimacionesObra.Items.Clear()
|
||||
Dim Con As New ClsContratos
|
||||
If Con.GetContratosAvanceEstimacionVentas(DdlContratosModal.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
||||
DdlEstimacionesObra.DataSource = Con.DtResultados
|
||||
Else
|
||||
DdlEstimacionesObra.DataSource = Nothing
|
||||
End If
|
||||
|
||||
Con.Dispose()
|
||||
|
||||
DdlEstimacionesObra.DataBind()
|
||||
DdlEstimacionesObra.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
BtnCargarContratoDetalles.Visible = False
|
||||
BtnCancelarContratoDetalles.Visible = False
|
||||
BtnCalcularTotalesContrato.Visible = False
|
||||
|
||||
BtnEstimacion.Visible = False
|
||||
GvEst.Visible = False
|
||||
GvContratoDetalles.Visible = False
|
||||
|
||||
End Select
|
||||
UPEstimaciones.Update()
|
||||
Updatetabs.Update()
|
||||
|
||||
ChkPSOC.Checked = False
|
||||
CambiaTipoDocto()
|
||||
@@ -3560,6 +3670,7 @@ Partial Class Ventas
|
||||
UpContratos.Update()
|
||||
End Sub
|
||||
Private Sub DdlContratoModalSelectIndex()
|
||||
|
||||
If Not DdlContratosModal.SelectedValue.ToEntero() > 0 Then
|
||||
GvContratoDetalles.DataBind()
|
||||
UpContratos.Update()
|
||||
@@ -7192,6 +7303,9 @@ Partial Class Ventas
|
||||
|
||||
Protected Sub EmitirImprimirNew(Optional TipoDoctoViejo As String = "")
|
||||
|
||||
If Not ValidaVentaContratoObra() Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If ValidaPagosContado() Then
|
||||
Exit Sub
|
||||
@@ -8785,6 +8899,13 @@ Partial Class Ventas
|
||||
ObjFactura.CveCorte = CveCorte
|
||||
ObjFactura.CveMesa = -1
|
||||
ObjFactura.NumeroPersonas = 0
|
||||
|
||||
|
||||
If ObjFactura.TipoDocto = "Ant" And DdlContratosModal.SelectedValue.ToEntero > 0 Or ObjFactura.TipoDocto = "Ing" And DdlContratosModal.SelectedValue.ToEntero > 0 Then
|
||||
CveContrato = DdlContratosModal.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
|
||||
ObjFactura.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
|
||||
ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero()
|
||||
@@ -10556,6 +10677,14 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
If ErrorList.Count = 0 AndAlso RBLTipoContrato.SelectedValue = "4" And DdlEstimacionesObra.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
If Not ObjContr.UpdateContratosAvanceEstimacionVentas(DdlEstimacionesObra.SelectedValue.ToEntero, ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
ErrorList.Add("Ocurrió un error al actualizar la estimación")
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If ErrorList.Count = 0 Then
|
||||
'prepoliza
|
||||
GuardarVentaPrePolizas(ObjConta, factura, TmpDTDetalle, CveNCaVincular, objContPaqi, ObjBancos, ObjVentas, ObjEventos:=ObjEventos, EsNCAmortizacion:=EsNCAmortizacion, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCDescuento, ObjInventario:=ObjInventario)
|
||||
@@ -13121,8 +13250,19 @@ Partial Class Ventas
|
||||
maxsaldo = total
|
||||
End If
|
||||
|
||||
|
||||
If DdlContratosModal.SelectedValue.ToEntero > 0 AndAlso AmortizacionSujeridaContrato > 0 Then
|
||||
|
||||
If AmortizacionSujeridaContrato > saldo Then
|
||||
AmortizacionSujeridaContrato = saldo
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
e.Row.FCLiteral("MonedaVenta").Text = saldo.FormatoNumero(2)
|
||||
e.Row.FCCheckBox("Chk" & e.Row.RowIndex).Attributes.Add("onclick", String.Format("chkAnt(this,{0},{1});", e.Row.FCTextBox("TxtAnticipo" & e.Row.RowIndex).ClientID, saldo))
|
||||
e.Row.FCCheckBox("Chk" & e.Row.RowIndex).Attributes.Add("onclick", String.Format("chkAnt(this,{0},{1},{2});", e.Row.FCTextBox("TxtAnticipo" & e.Row.RowIndex).ClientID, saldo, AmortizacionSujeridaContrato))
|
||||
e.Row.FCTextBox("TxtAnticipo" & e.Row.RowIndex).Attributes.Add("onKeyUp", String.Format("FnCambiaAnt({0},this,{1});", e.Row.FCCheckBox("Chk" & e.Row.RowIndex).ClientID, saldo))
|
||||
e.Row.FCTextBox("TxtTC" & e.Row.RowIndex).Attributes.Add("onKeyUp", String.Format("CambioTipoMoneda({0},{1},{2},{3},{4});", e.Row.FCCheckBox("Chk" & e.Row.RowIndex).ClientID, e.Row.DataKey("Saldo"), e.Row.FCTextBox("TxtAnticipo" & e.Row.RowIndex).ClientID, e.Row.FCTextBox("TxtTC" & e.Row.RowIndex).ClientID, e.Row.DataKey("CveMoneda")))
|
||||
|
||||
@@ -13159,7 +13299,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnAceptarAnticipos_Click(sender As Object, e As System.EventArgs) Handles BtnAceptarAnticipos.Click
|
||||
Anticipos()
|
||||
@@ -18141,25 +18281,53 @@ Partial Class Ventas
|
||||
BtnEstimacion.Visible = True
|
||||
End If
|
||||
|
||||
'If RblOpcionContrato.SelectedValue = "3" Then
|
||||
|
||||
|
||||
' GvEst.DataSource = Nothing
|
||||
' GvEst.DataBind()
|
||||
' BtnEstimacion.Visible = False
|
||||
|
||||
' BtnCargarContratoDetalles.Visible = False
|
||||
' BtnCancelarContratoDetalles.Visible = False
|
||||
|
||||
' UPEstimaciones.Update()
|
||||
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaDatosEstimaciones(CveCliente As Integer)
|
||||
If CveVenta > 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
Dim Con As New ClsContratos
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If Con.GetEstimacionesPorFacturar(-1, CveCliente, DdlContrato.SelectedValue.ToEntero(), 0, UsuarioActual.CveEmpresa) Then
|
||||
GvEst.DataSource = Con.DtResultados
|
||||
If Con.DtResultados.Rows.Count > 0 Then
|
||||
'BtnEstimacion.Visible = True
|
||||
DdlContrato.Items.Clear()
|
||||
DdlContrato.Items.Add(New ListItem("Todos", "-1"))
|
||||
DdlContrato.DataSource = Con.DtResultados.FiltraParametros("CveContrato > 0", "NumeroContrato", DistinctColumns:={"CveContrato", "NumeroContrato"})
|
||||
GvEst.DataSource = Con.DtResultados
|
||||
If Con.DtResultados.Rows.Count > 0 Then
|
||||
'BtnEstimacion.Visible = True
|
||||
DdlContrato.Items.Clear()
|
||||
DdlContrato.Items.Add(New ListItem("Todos", "-1"))
|
||||
DdlContrato.DataSource = Con.DtResultados.FiltraParametros("CveContrato > 0", "NumeroContrato", DistinctColumns:={"CveContrato", "NumeroContrato"})
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
UPEstimaciones.Update()
|
||||
Con.Dispose()
|
||||
DdlContrato.DataBind()
|
||||
GvEst.DataBind()
|
||||
|
||||
|
||||
UPEstimaciones.Update()
|
||||
Con.Dispose()
|
||||
DdlContrato.DataBind()
|
||||
GvEst.DataBind()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub GVEst_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEst.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -25062,7 +25230,12 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Private Sub DdlTipoAmortizacionAnticipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoAmortizacionAnticipo.SelectedIndexChanged
|
||||
|
||||
|
||||
ImporteSujeridoAnticipo(DdlTipoAmortizacionAnticipo.SelectedValue.ToEntero)
|
||||
|
||||
divAnticipoMsg.Visible = False
|
||||
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue.Contiene("1", "2") Then
|
||||
'cuando es amortización por descuento, debe tener seleccionado descuentos previamente registrados
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "1" AndAlso LblDescuentos.Text.ToDecimal <= 0 Then
|
||||
@@ -25084,6 +25257,34 @@ Partial Class Ventas
|
||||
DdlTipoRelacionAnticipo.SelectedValueExist("-1")
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ImporteSujeridoAnticipo(TipoAmortizacion As Integer)
|
||||
|
||||
'TipoAmortizacion
|
||||
'1.-Anticpo como descuento se basa en subtotal
|
||||
'2.-Anticipo con notade credito se basa en total
|
||||
|
||||
AmortizacionSujeridaContrato = 0
|
||||
Dim Porcentaje As Decimal = PorAmortizacionAnticipo * 0.01D
|
||||
|
||||
If PorAmortizacionAnticipo > 0 AndAlso TipoAmortizacion > 0 Then
|
||||
|
||||
If TipoAmortizacion = 1 Then
|
||||
AmortizacionSujeridaContrato = (TxtSubTotal2.Text.ToDecimal * Porcentaje).RoundSQL(2)
|
||||
ElseIf TipoAmortizacion = 2 Then
|
||||
AmortizacionSujeridaContrato = (TxtTotal.Text.ToDecimal * Porcentaje).RoundSQL(2)
|
||||
End If
|
||||
|
||||
Else
|
||||
AmortizacionSujeridaContrato = 0
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DdlMetodoPago33_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlMetodoPago33.SelectedIndexChanged
|
||||
@@ -27751,6 +27952,55 @@ Partial Class Ventas
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Function ValidaVentaContratoObra() As Boolean
|
||||
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
If EscontratoObra Then
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||
|
||||
If DdlEstimacionesObra.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Dim ImporteAmortizarFinal As Decimal = 0
|
||||
If GVAnticipos.Rows.Count > 0 Then
|
||||
Dim actualindex As Integer = 0
|
||||
For Each row2 As GridViewRow In GVAnticipos.Rows
|
||||
If row2.FCCheckBox("Chk" & row2.RowIndex).Checked Then
|
||||
ImporteAmortizarFinal = ImporteAmortizarFinal + row2.FCTextBox($"TxtAnticipo{actualindex}").Text.ToDecimal
|
||||
End If
|
||||
actualindex = actualindex + 1
|
||||
Next
|
||||
End If
|
||||
|
||||
If ImporteAmortizarFinal > 0 Then
|
||||
Respuesta = True
|
||||
Else
|
||||
Respuesta = False
|
||||
Alert("Debe de seleccioanr un importe de amortización.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
Else
|
||||
Respuesta = False
|
||||
Alert("Se selecciono un contrato de obra, para continuar seleccione una estimación.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ElseIf DdlTipoComprobante.SelectedValue = "Ant" Then
|
||||
Respuesta = True
|
||||
Else
|
||||
Alert("Tipo de documento no valido para contratos de obra.", TipoMensaje.MsgAdvertencia)
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
Else
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user