Dll SAT pais, estado, municipio, localidad, colonia
This commit is contained in:
@@ -147,6 +147,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
@@ -335,7 +335,7 @@ Public Class ClsSubProyectos
|
||||
Public Function AddCentroCosto(SubProyecto As String, IdSegNeg As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "",
|
||||
Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0,
|
||||
Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1,
|
||||
Optional Telefono As String = "", Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "") As Boolean
|
||||
Optional Telefono As String = "", Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "", Optional CveLocalidad As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_CentroCostoAdd")
|
||||
@@ -369,6 +369,7 @@ Public Class ClsSubProyectos
|
||||
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
|
||||
.Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
|
||||
.Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal
|
||||
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
@@ -391,7 +392,7 @@ Public Class ClsSubProyectos
|
||||
Public Function UpdateCentroCosto(CveSubProyecto As Integer, SubProyecto As String, IdSegNeg As Integer, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "",
|
||||
Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0,
|
||||
Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1,
|
||||
Optional Telefono As String = "", Optional HorarioVerano As Integer = Nothing, Optional HorarioInvierno As Integer = Nothing, Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "") As Boolean
|
||||
Optional Telefono As String = "", Optional HorarioVerano As Integer = Nothing, Optional HorarioInvierno As Integer = Nothing, Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "", Optional CveLocalidad As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_CentroCostoUpdate")
|
||||
@@ -429,6 +430,8 @@ Public Class ClsSubProyectos
|
||||
.Add("@HorarioInvierno", SqlDbType.Int).Value = HorarioInvierno
|
||||
.Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
|
||||
.Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal
|
||||
.Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<div style="">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveSubProyecto,SubProyecto,IdSegNeg,Estatus,Serie,IVA,Calle,NoExt,NoInt,Colonia,Localidad,Municipio,Estado,Pais,CP,CveProyecto,TipoSucursal,EsSucursal,
|
||||
CvePais,CveEstado,CveMunicipio,CveColonia,AplicaComercioExterior,CvePrecioLista,Correo,Telefono,UTCOffsetVerano,UTCOffsetInvierno,NoVerificaAlmacen,CodigoSucursal"
|
||||
CvePais,CveEstado,CveMunicipio,CveColonia,AplicaComercioExterior,CvePrecioLista,Correo,Telefono,UTCOffsetVerano,UTCOffsetInvierno,NoVerificaAlmacen,CodigoSucursal,CveLocalidad"
|
||||
EmptyDataText="No se encontraron SubProyectos" ShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="SubProyecto" HeaderText="Centro de costo" />
|
||||
@@ -120,6 +120,11 @@
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display:none">
|
||||
<asp:Button ID="BtnValidar" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="BtnValidar_Click" Text="validar" />
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -180,7 +185,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkAplicaComercioExterior" AutoPostBack="true" OnCheckedChanged="ChkAplicaComercioExterior_CheckedChanged" runat="server" CssClass="form-control" Checked="false" />
|
||||
<asp:CheckBox ID="ChkAplicaComercioExterior" AutoPostBack="true" runat="server" CssClass="form-control" Checked="false" />
|
||||
<label for="<%= ChkAplicaComercioExterior.ClientID.ToString()%>">¿Aplica Comercio Exterior?</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -273,18 +278,81 @@
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPais" runat="server" CssClass="form-control" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator Visible="false" ID="RFVPais" runat="server" Enabled="false" CssClass="help-block errorimput miclase" ControlToValidate="TxtPais" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<asp:RequiredFieldValidator Visible="false" ID="RFVPais" runat="server" Enabled="false" CssClass="help-block errorimput miclase" ControlToValidate="TxtPais" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio" ></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtPais.ClientID.ToString()%>">Pais:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCP" runat="server" CssClass="form-control" MaxLength="5"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCP" runat="server" CssClass="form-control" MaxLength="5" onblur="ValidaCodigoPostal()" onkeypress="if(event.key === 'Enter'){return false;}" ></asp:TextBox>
|
||||
<asp:RequiredFieldValidator Visible="false" ID="RFVCP" runat="server" Enabled="false" CssClass="help-block errorimput miclase" ControlToValidate="TxtCP" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''CP''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCP" FilterType="Custom" ValidChars="0123456789"></ajax:FilteredTextBoxExtender>
|
||||
<label for="<%= TxtCP.ClientID.ToString()%>">CP:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPais" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlPais_SelectedIndexChanged" runat="server" DataTextField="ClaveSATPaisDescripcion" DataValueField="CvePais" CssClass="form-control select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlPais" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlPais" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlPais.ClientID.ToString()%>">Pais:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlEstado" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlEstado_SelectedIndexChanged" runat="server" DataTextField="ClaveSATEstadoNombreEstado" DataValueField="CveEstado" CssClass="form-control select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlEstado" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlEstado" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlEstado.ClientID.ToString()%>">Estado:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMunicipio" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlMunicipio_SelectedIndexChanged" runat="server" DataTextField="ClaveSATMunicipioDescripcion" DataValueField="CveMunicipio" CssClass="form-control select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlMunicipio.ClientID.ToString()%>">Municipio:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlLocalidad" CssClass="form-control select2me" DataValueField="CveLocalidad" DataTextField="NombreLocalidad" Width="100%"></asp:DropDownList>
|
||||
<label for="<%= DdlLocalidad.ClientID.ToString()%>">Localidad:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlColonia" runat="server" AppendDataBoundItems="true" DataTextField="ClaveSATColoniaNombreAsentamiento" DataValueField="CveColonia" CssClass="form-control select2me" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlColonia_SelectedIndexChanged">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlColonia" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlColonia" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Colonia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlColonia.ClientID.ToString()%>">Colonia:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTelefono" runat="server" CssClass="form-control" MaxLength="15"></asp:TextBox>
|
||||
<label for="<%= TxtTelefono.ClientID.ToString()%>">Telefono:</label>
|
||||
@@ -322,38 +390,19 @@
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabComercioExterior" Visible="false" runat="server" HeaderText="Comercio Exterior">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<%-- <ajax:TabPanel ID="TabComercioExterior" Visible="false" runat="server" HeaderText="Comercio Exterior">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPais" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlPais_SelectedIndexChanged" runat="server" DataTextField="ClaveSATPaisDescripcion" DataValueField="CvePais" CssClass="form-control select2me" Width="50%">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlPais.ClientID.ToString()%>">Pais:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlEstado" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlEstado_SelectedIndexChanged" runat="server" DataTextField="ClaveSATEstadoNombreEstado" DataValueField="CveEstado" CssClass="form-control select2me" Width="50%">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlEstado.ClientID.ToString()%>">Estado:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMunicipio" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlMunicipio_SelectedIndexChanged" runat="server" DataTextField="ClaveSATMunicipioDescripcion" DataValueField="CveMunicipio" CssClass="form-control select2me" Width="50%">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlMunicipio.ClientID.ToString()%>">Municipio:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlColonia" runat="server" AppendDataBoundItems="true" DataTextField="ClaveSATColoniaNombreAsentamiento" DataValueField="CveColonia" CssClass="form-control select2me" Width="50%">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlColonia.ClientID.ToString()%>">Colonia:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabPanel>--%>
|
||||
</ajax:TabContainer>
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -375,7 +424,7 @@
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script >
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el SubProyecto?');
|
||||
}
|
||||
@@ -386,5 +435,13 @@
|
||||
document.getElementById("hiddenModalContent").style.display = "none";
|
||||
}
|
||||
|
||||
|
||||
function ValidaCodigoPostal() {
|
||||
|
||||
$("#BtnValidar").click();
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -74,6 +74,7 @@ Partial Class CatSubProyectos
|
||||
CargaEstado()
|
||||
CargaMunicipio()
|
||||
CargaColonia()
|
||||
CargaLocalidad()
|
||||
|
||||
CargaPrecioLista()
|
||||
|
||||
@@ -301,7 +302,9 @@ Partial Class CatSubProyectos
|
||||
DdlMunicipio.SelectedValueExist(GvRow.DataKey("CveMunicipio"))
|
||||
CargaColonia()
|
||||
DdlColonia.SelectedValueExist(GvRow.DataKey("CveColonia"))
|
||||
AplicaComercio()
|
||||
CargaLocalidad()
|
||||
DdlLocalidad.SelectedValueExist(GvRow.DataKey("CveLocalidad"))
|
||||
'AplicaComercio()
|
||||
ChkNoVerificaAlmacen.Checked = If(GvRow.DataKey("NoVerificaAlmacen").ToString = "True", True, False)
|
||||
TxtCodigoSucursal.Text = (GvRow.DataKey("CodigoSucursal"))
|
||||
|
||||
@@ -368,12 +371,52 @@ Partial Class CatSubProyectos
|
||||
Dim IdSeg As Integer
|
||||
If DdlSegmentoNegocio.Visible = True Then IdSeg = DdlSegmentoNegocio.SelectedValue.ToEntero Else IdSeg = 0
|
||||
|
||||
'CREA SUBPROYECTO
|
||||
|
||||
|
||||
Dim StrPais As String = ""
|
||||
Dim StrEstado As String = ""
|
||||
Dim StrMunicipio As String = ""
|
||||
Dim StrLocalidad As String = ""
|
||||
Dim StrColonia As String = ""
|
||||
|
||||
|
||||
|
||||
If DdlPais.SelectedValue.ToEntero > 0 Then
|
||||
StrPais = DdlPais.SelectedItem.Text
|
||||
Else
|
||||
StrPais = TxtPais.Text
|
||||
End If
|
||||
|
||||
If DdlEstado.SelectedValue.ToEntero > 0 Then
|
||||
StrEstado = DdlEstado.SelectedItem.Text
|
||||
Else
|
||||
StrEstado = TxtEstado.Text
|
||||
End If
|
||||
|
||||
If DdlMunicipio.SelectedValue.ToEntero > 0 Then
|
||||
StrMunicipio = DdlMunicipio.SelectedItem.Text
|
||||
Else
|
||||
StrMunicipio = TxtMunicipio.Text
|
||||
End If
|
||||
|
||||
If DdlLocalidad.SelectedValue.ToEntero > 0 Then
|
||||
StrLocalidad = DdlLocalidad.SelectedItem.Text
|
||||
Else
|
||||
StrLocalidad = TxtLocalidad.Text
|
||||
End If
|
||||
|
||||
If DdlColonia.SelectedValue.ToEntero > 0 Then
|
||||
StrColonia = DdlColonia.SelectedItem.Text
|
||||
Else
|
||||
StrColonia = TxtColonia.Text
|
||||
End If
|
||||
|
||||
'CREA SUBPROYECTO
|
||||
If HdnModalidad.Value = "I" Then
|
||||
If Not ObjSubproyectos.AddCentroCosto(TxtCentroCosto.Text.Trim, IdSeg, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim,
|
||||
NoInt:=TxtNoInt.Text.Trim, Colonia:=TxtColonia.Text.Trim, Localidad:=TxtLocalidad.Text.Trim, Municipio:=TxtMunicipio.Text.Trim, Estado:=TxtEstado.Text.Trim, Pais:=TxtPais.Text.Trim, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
|
||||
NoInt:=TxtNoInt.Text.Trim, Colonia:=StrColonia, Localidad:=StrLocalidad, Municipio:=StrMunicipio, Estado:=StrEstado, Pais:=StrPais, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
|
||||
CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero,
|
||||
Telefono:=TxtTelefono.Text, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim) Then
|
||||
Telefono:=TxtTelefono.Text, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero) Then
|
||||
TieneError = True
|
||||
Else
|
||||
CveSubProyecto = ObjSubproyectos.CveSubProyecto
|
||||
@@ -381,9 +424,9 @@ Partial Class CatSubProyectos
|
||||
Else
|
||||
If (HorarioVerano > -13 And HorarioVerano < 13) And (HorarioInvierno > -13 And HorarioInvierno < 13) Then
|
||||
If Not ObjSubproyectos.UpdateCentroCosto(CveCentroCosto, TxtCentroCosto.Text.Trim, IdSeg, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim,
|
||||
NoInt:=TxtNoInt.Text.Trim, Colonia:=TxtColonia.Text.Trim, Localidad:=TxtLocalidad.Text.Trim, Municipio:=TxtMunicipio.Text.Trim, Estado:=TxtEstado.Text.Trim, Pais:=TxtPais.Text.Trim, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
|
||||
NoInt:=TxtNoInt.Text.Trim, Colonia:=StrColonia, Localidad:=TxtLocalidad.Text.Trim, Municipio:=StrMunicipio, Estado:=StrEstado, Pais:=StrPais, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
|
||||
CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero,
|
||||
Telefono:=TxtTelefono.Text, HorarioVerano:=TxtHorarioVerano.Text.ToEntero, HorarioInvierno:=TxtHorarioInvierno.Text.ToEntero, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim) Then
|
||||
Telefono:=TxtTelefono.Text, HorarioVerano:=TxtHorarioVerano.Text.ToEntero, HorarioInvierno:=TxtHorarioInvierno.Text.ToEntero, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
@@ -668,7 +711,7 @@ Partial Class CatSubProyectos
|
||||
ChkEsMatriz.Checked = False
|
||||
ChkEsSucursal.Checked = False
|
||||
ChkAplicaComercioExterior.Checked = False
|
||||
TabComercioExterior.Visible = False
|
||||
'TabComercioExterior.Visible = False
|
||||
|
||||
TxtSerie.Text = ""
|
||||
TxtIVA.Text = "0.16"
|
||||
@@ -689,6 +732,7 @@ Partial Class CatSubProyectos
|
||||
CargaEstado()
|
||||
CargaMunicipio()
|
||||
CargaColonia()
|
||||
CargaLocalidad()
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
CargaSegmentosNegocio()
|
||||
@@ -790,36 +834,80 @@ Partial Class CatSubProyectos
|
||||
End If
|
||||
DdlColonia.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlColonia.DataBind()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub CargaLocalidad()
|
||||
|
||||
DdlLocalidad.Items.Clear()
|
||||
|
||||
If DdlEstado.SelectedValue.ToEntero > 0 Then
|
||||
DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero)
|
||||
DdlLocalidad.DataBind()
|
||||
End If
|
||||
|
||||
DdlLocalidad.Items.Insert(0, New ListItem("Seleccione una", "-1"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlPais_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaEstado()
|
||||
CargaMunicipio()
|
||||
CargaColonia()
|
||||
CargaLocalidad()
|
||||
End Sub
|
||||
Protected Sub DdlEstado_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaMunicipio()
|
||||
CargaColonia()
|
||||
End Sub
|
||||
Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaColonia()
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkAplicaComercioExterior_CheckedChanged(sender As Object, e As EventArgs)
|
||||
AplicaComercio()
|
||||
End Sub
|
||||
|
||||
Private Sub AplicaComercio()
|
||||
If ChkAplicaComercioExterior.Checked Then
|
||||
TabComercioExterior.Visible = True
|
||||
Else
|
||||
TabComercioExterior.Visible = False
|
||||
End If
|
||||
UpBodyCentroCosto.Update()
|
||||
End Sub
|
||||
|
||||
CargaLocalidad()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaColonia()
|
||||
CargaLocalidad()
|
||||
End Sub
|
||||
|
||||
'Protected Sub ChkAplicaComercioExterior_CheckedChanged(sender As Object, e As EventArgs)
|
||||
' AplicaComercio()
|
||||
'End Sub
|
||||
|
||||
'Private Sub AplicaComercio()
|
||||
' If ChkAplicaComercioExterior.Checked Then
|
||||
' TabComercioExterior.Visible = True
|
||||
' Else
|
||||
' TabComercioExterior.Visible = False
|
||||
' End If
|
||||
' UpBodyCentroCosto.Update()
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnValidar_Click(sender As Object, e As EventArgs)
|
||||
validaCodigoPostal()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlColonia_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
validaCodigoPostal()
|
||||
End Sub
|
||||
|
||||
Private Sub validaCodigoPostal()
|
||||
|
||||
Dim CPTxt As Integer = TxtCP.Text.ToEntero()
|
||||
|
||||
Dim CveColonia As Integer = DdlColonia.SelectedValue.ToEntero
|
||||
|
||||
If CPTxt > 0 And CveColonia > 0 Then
|
||||
Dim CP As Integer = GlobalDTColonia("-1").FiltroPrimeroValor("CP", $"CveColonia = {CveColonia}").ToEntero
|
||||
If CPTxt <> CP Then
|
||||
Alert("El codigo postal selecionado es diferente del codigo postal de la Colonia.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user