CatBancos CveSATBancos, EntregaAlamcen desactivar requiered de fecha de caducidad cuando no este marcado el check
This commit is contained in:
@@ -295,7 +295,8 @@ Public Class ClsBancos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddBancos(Banco As String, Ejecutivo As String, Telefono As String, CveUsuario As Integer, CveEmpresa As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1") As Boolean
|
Public Function AddBancos(Banco As String, Ejecutivo As String, Telefono As String, CveUsuario As Integer, CveEmpresa As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1",
|
||||||
|
Optional CveSATBanco As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Banc_BancosAdd ")
|
DataAdapter("PA_Banc_BancosAdd ")
|
||||||
@@ -308,6 +309,7 @@ Public Class ClsBancos
|
|||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@IdContPaq", SqlDbType.Int).Value = IdContPaq
|
.Add("@IdContPaq", SqlDbType.Int).Value = IdContPaq
|
||||||
.Add("@RFC", SqlDbType.VarChar).Value = RFC
|
.Add("@RFC", SqlDbType.VarChar).Value = RFC
|
||||||
|
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -326,7 +328,8 @@ Public Class ClsBancos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateBancos(Banco As String, Ejecutivo As String, Telefono As String, Estatus As Boolean, CveBanco As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1") As Boolean
|
Public Function UpdateBancos(Banco As String, Ejecutivo As String, Telefono As String, Estatus As Boolean, CveBanco As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1",
|
||||||
|
Optional CveSATBanco As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Banc_BancosUpdate")
|
DataAdapter("PA_Banc_BancosUpdate")
|
||||||
@@ -339,6 +342,7 @@ Public Class ClsBancos
|
|||||||
.Add("@CveBanco", SqlDbType.Int).Value = CveBanco
|
.Add("@CveBanco", SqlDbType.Int).Value = CveBanco
|
||||||
.Add("@IdContPaq", SqlDbType.Int).Value = IdContPaq
|
.Add("@IdContPaq", SqlDbType.Int).Value = IdContPaq
|
||||||
.Add("@RFC", SqlDbType.VarChar).Value = RFC
|
.Add("@RFC", SqlDbType.VarChar).Value = RFC
|
||||||
|
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -4,6 +4,16 @@
|
|||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.select2 .select2-selection{
|
||||||
|
max-height:21.14px!important
|
||||||
|
}
|
||||||
|
.select2-selection__rendered{
|
||||||
|
margin-top:-4px!important
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
<li>
|
<li>
|
||||||
@@ -24,6 +34,12 @@
|
|||||||
<table class="table table-striped table-advance table-hover">
|
<table class="table table-striped table-advance table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="Titulos">
|
<tr class="Titulos">
|
||||||
|
<th width="150px">
|
||||||
|
<asp:LinkButton ID="LbBancoSAT" runat="server" CausesValidation="false" Text="" CommandArgument="BancoSAT" OnClick="LbOrden_Click">
|
||||||
|
Banco SAT
|
||||||
|
<asp:Literal ID="ImgBancoSAT" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||||
|
</asp:LinkButton>
|
||||||
|
</th>
|
||||||
<th width="150px">
|
<th width="150px">
|
||||||
<asp:LinkButton ID="LbBanco" runat="server" CausesValidation="false" Text="" CommandArgument="Banco" OnClick="LbOrden_Click">
|
<asp:LinkButton ID="LbBanco" runat="server" CausesValidation="false" Text="" CommandArgument="Banco" OnClick="LbOrden_Click">
|
||||||
Banco
|
Banco
|
||||||
@@ -64,6 +80,13 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>
|
||||||
|
<asp:DropDownList CssClass="form-control select2me" Width="100%" ID="DdlSatBanco" runat="server" DataTextField="Banco" DataValueField="CveSATBanco">
|
||||||
|
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVDdlSatBanco" runat="server" InitialValue="-1" ControlToValidate="DdlSatBanco" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCRFVDdlSatBanco" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlSatBanco" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtBanco" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="140px"></asp:TextBox>
|
<asp:TextBox ID="TxtBanco" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="140px"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVBanco" runat="server" ControlToValidate="TxtBanco" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVBanco" runat="server" ControlToValidate="TxtBanco" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
@@ -90,8 +113,22 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveBanco" EmptyDataText="No se encontraron Bancos Registrados" ToolTip="Listado de Bancos" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None">
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveBanco,CveSATBanco" EmptyDataText="No se encontraron Bancos Registrados" ToolTip="Listado de Bancos"
|
||||||
|
CssClass="table table-striped table-advance table-hover mysmallbtn" Style="margin-top: -10px;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlBancoSAT" runat="server" Text='<%# Eval("SATBanco", "{0}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
<EditItemTemplate>
|
||||||
|
<asp:DropDownList CssClass="form-control select2me" Width="100%" ID="DdlSatBanco" runat="server" DataTextField="Banco" DataValueField="CveSATBanco" Height="21.14px">
|
||||||
|
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVDdlSatBanco" runat="server" InitialValue="-1" ControlToValidate="DdlSatBanco" Display="None"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCRFVDdlSatBanco" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlSatBanco" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</EditItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlBanco" runat="server" Text='<%# Eval("Banco", "{0}") %>'></asp:Literal>
|
<asp:Literal ID="LtlBanco" runat="server" Text='<%# Eval("Banco", "{0}") %>'></asp:Literal>
|
||||||
@@ -142,10 +179,14 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Editar">
|
<asp:TemplateField HeaderText="Editar">
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<center>
|
<div class="row">
|
||||||
<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" />
|
<div class="col-md-6" style="text-align:right!important">
|
||||||
<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>" />
|
<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" />
|
||||||
</center>
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<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>" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
<ItemTemplate>
|
<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>" />
|
<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>" />
|
||||||
|
|||||||
@@ -19,13 +19,43 @@ Partial Class Bancos_CatBancos
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property DTBancosSAT As DataTable
|
||||||
|
Get
|
||||||
|
If ViewState("DTBancosSAT") Is Nothing Then
|
||||||
|
ViewState("DTBancosSAT") = New DataTable()
|
||||||
|
End If
|
||||||
|
Return DirectCast(ViewState("DTBancosSAT"), DataTable)
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(ByVal value As DataTable)
|
||||||
|
ViewState("DTBancosSAT") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
|
CargaBancosSAT()
|
||||||
ViewState("Orden") = ""
|
ViewState("Orden") = ""
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaBancosSAT()
|
||||||
|
|
||||||
|
Dim ObjBancos As New ClsBancos
|
||||||
|
|
||||||
|
If ObjBancos.GetBancosSAT Then
|
||||||
|
DdlSatBanco.DataSource = ObjBancos.DtResultados
|
||||||
|
DTBancosSAT = ObjBancos.DtResultados
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjBancos.Dispose()
|
||||||
|
|
||||||
|
DdlSatBanco.DataBind()
|
||||||
|
DdlSatBanco.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Sub CargaDatos()
|
Public Sub CargaDatos()
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
If ObjBancos.GetBancos() Then
|
If ObjBancos.GetBancos() Then
|
||||||
@@ -47,7 +77,8 @@ Partial Class Bancos_CatBancos
|
|||||||
|
|
||||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
If ObjBancos.AddBancos(TxtBanco.Text.Trim, TxtEjecutivo.Text.Trim, TxtTelefono.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ObjBancos.AddBancos(TxtBanco.Text.Trim, TxtEjecutivo.Text.Trim, TxtTelefono.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveSATBanco:=DdlSatBanco.SelectedValue.ToEntero) Then
|
||||||
|
DdlSatBanco.SelectedValueExist(-1)
|
||||||
TxtBanco.Text = ""
|
TxtBanco.Text = ""
|
||||||
TxtEjecutivo.Text = ""
|
TxtEjecutivo.Text = ""
|
||||||
TxtTelefono.Text = ""
|
TxtTelefono.Text = ""
|
||||||
@@ -68,24 +99,42 @@ Partial Class Bancos_CatBancos
|
|||||||
|
|
||||||
#Region "G V D A T O S"
|
#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
|
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.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If e.Row.RowIndex = 0 Then
|
If e.Row.RowIndex = 0 Then
|
||||||
e.Row.Cells(0).Width = Unit.Pixel(156) 'BANCO
|
e.Row.Cells(0).Width = Unit.Pixel(156) 'BANCO SAT
|
||||||
e.Row.Cells(1).Width = Unit.Pixel(206) 'EJECUTIVO
|
e.Row.Cells(1).Width = Unit.Pixel(156) 'BANCO
|
||||||
e.Row.Cells(2).Width = Unit.Pixel(106) 'TELEFONO
|
e.Row.Cells(2).Width = Unit.Pixel(206) 'EJECUTIVO
|
||||||
e.Row.Cells(3).Width = Unit.Pixel(95) 'ESTATUS
|
e.Row.Cells(3).Width = Unit.Pixel(106) 'TELEFONO
|
||||||
e.Row.Cells(4).Width = Unit.Pixel(95) 'FECHA
|
e.Row.Cells(4).Width = Unit.Pixel(95) 'ESTATUS
|
||||||
e.Row.Cells(5).Width = Unit.Pixel(100) 'USUARIO
|
e.Row.Cells(5).Width = Unit.Pixel(95) 'FECHA
|
||||||
e.Row.Cells(6).Width = Unit.Pixel(100) 'EDITAR
|
e.Row.Cells(6).Width = Unit.Pixel(100) 'USUARIO
|
||||||
e.Row.Cells(7).Width = Unit.Pixel(65) 'ELIMINAR
|
e.Row.Cells(7).Width = Unit.Pixel(65) 'EDITAR
|
||||||
|
e.Row.Cells(8).Width = Unit.Pixel(65) 'ELIMINAR
|
||||||
End If
|
End If
|
||||||
|
|
||||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
||||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||||
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
|
'e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
|
||||||
|
e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Center
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If (e.Row.RowState And DataControlRowState.Edit) = DataControlRowState.Edit Then
|
||||||
|
Dim DdlSatBanco As DropDownList = e.Row.FCDropDownList("DdlSatBanco")
|
||||||
|
DdlSatBanco.ClearSelection()
|
||||||
|
DdlSatBanco.SelectedValue = Nothing
|
||||||
|
DdlSatBanco.Items.Clear()
|
||||||
|
DdlSatBanco.DataSource = DTBancosSAT
|
||||||
|
DdlSatBanco.DataBind()
|
||||||
|
DdlSatBanco.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||||
|
DdlSatBanco.SelectedValueExist(e.Row.DataKey("CveSATBanco").ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||||
@@ -126,19 +175,16 @@ Partial Class Bancos_CatBancos
|
|||||||
Dim Telefono As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtTelefono"), TextBox).Text.Trim
|
Dim Telefono As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtTelefono"), TextBox).Text.Trim
|
||||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||||
Dim CveBanco As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
Dim CveBanco As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||||
|
Dim CveSATBanco As Integer = GvDatos.Rows(e.RowIndex).FCDropDownList("DdlSatBanco").SelectedValue.ToEntero
|
||||||
|
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco) Then
|
If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco, CveSATBanco:=CveSATBanco) Then
|
||||||
If ObjBancos.InhabilitarCuentasBancos(CveBanco, Estatus) Then
|
|
||||||
GvDatos.EditIndex = -1
|
If Not ObjBancos.InhabilitarCuentasBancos(CveBanco, Estatus) Then
|
||||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
|
||||||
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
|
||||||
GlobalDTBancos = ObjBancos.DtResultados
|
|
||||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
|
||||||
Else
|
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
@@ -152,12 +198,24 @@ Partial Class Bancos_CatBancos
|
|||||||
|
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
If Not TieneError Then
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
|
||||||
Else
|
GvDatos.EditIndex = -1
|
||||||
CargaGrid("")
|
CargaDatos()
|
||||||
|
GlobalDTBancos = Nothing
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||||
|
|||||||
@@ -1163,16 +1163,36 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function fncCantidad(checkbox, numeroMax, idTbCantidadF) {
|
function fncCantidad(checkbox, numeroMax, idTbCantidadF, rfv) {
|
||||||
|
|
||||||
var $textbox = $('#' + idTbCantidadF);
|
var $textbox = $('#' + idTbCantidadF);
|
||||||
|
|
||||||
if ($(checkbox).is(':checked')) {
|
if ($(checkbox).is(':checked')) {
|
||||||
$textbox.val(numeroMax);
|
$textbox.val(numeroMax);
|
||||||
|
activarValidatorPorId(rfv);
|
||||||
} else {
|
} else {
|
||||||
$textbox.val(0);
|
$textbox.val(0);
|
||||||
|
desactivarValidatorPorId(rfv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function desactivarValidatorPorId(idValidatorCliente) {
|
||||||
|
var validator = document.getElementById(idValidatorCliente);
|
||||||
|
if (validator) {
|
||||||
|
validator.enabled = false;
|
||||||
|
validator.style.display = "none";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function activarValidatorPorId(idValidatorCliente) {
|
||||||
|
var validator = document.getElementById(idValidatorCliente);
|
||||||
|
if (validator) {
|
||||||
|
validator.enabled = true;
|
||||||
|
validator.style.display = "inline";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1278,7 +1278,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If BloqueCantidad Then
|
If BloqueCantidad Then
|
||||||
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||||
Else
|
Else
|
||||||
e.Row.FCCheckBox("cbInv").Attributes.Add("onclick", $"fncCantidad(this,{e.Row.DBCampo("CantidadF")},'{e.Row.FCTextBox("TbCantidadF").ClientID}')")
|
e.Row.FCCheckBox("cbInv").Attributes.Add("onclick", $"fncCantidad(this,{e.Row.DBCampo("CantidadF")},'{e.Row.FCTextBox("TbCantidadF").ClientID}','{e.Row.FCRequiredFieldValidator("RFVCaducidad").ClientID}')")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -1996,6 +1996,8 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
#Region " GUARDAR "
|
#Region " GUARDAR "
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||||
|
Alert("ok")
|
||||||
|
Exit Sub
|
||||||
|
|
||||||
Select Case TipoEntrega
|
Select Case TipoEntrega
|
||||||
Case 1
|
Case 1
|
||||||
|
|||||||
Reference in New Issue
Block a user