Crear a partir de cuando tiene carta porte
This commit is contained in:
@@ -2218,9 +2218,15 @@
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UPComplementosSAT" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="TextTab" style="width: 100%">
|
||||
<%-- <table border="0" cellpadding="0" cellspacing="0" class="TextTab" style="width: 100%">
|
||||
<tr valign="top">
|
||||
<td rowspan="1" colspan="2">
|
||||
<td rowspan="1" colspan="2"></td>
|
||||
<td rowspan="1" colspan="1"></td>
|
||||
<td rowspan="1" colspan="1"></td>
|
||||
</tr>
|
||||
</table>--%>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div id="DivCartaPorte" runat="server" visible="false" class="portlet light xspadding bordered whitoutcol" style="width: 100%">
|
||||
@@ -2252,40 +2258,38 @@
|
||||
<div class="row rowpadding">
|
||||
<label class="col-md-2">Origen:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlDireccionOrigen" runat="server" AutoPostBack="true" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalClienteVentaDireccion" DataValueField="CveDireccionEnvio" Width="100%" OnSelectedIndexChanged="DdlDireccionOrigen_SelectedIndexChanged">
|
||||
<asp:DropDownList ID="DdlDireccionOrigen" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalClienteVentaDireccion" DataValueField="CveDireccionEnvio" Width="100%">
|
||||
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%--<asp:TextBox ID="TxtOrigenCP" runat="server" Enabled="false" Text="" CssClass="form-control input-sm"></asp:TextBox>--%>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row rowpadding">
|
||||
<label class="col-md-2">Destino:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlDireccionDestino" runat="server" AutoPostBack="true" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalClienteVentaDireccion" DataValueField="CveDireccionEnvio" Width="100%" OnSelectedIndexChanged="DdlDireccionDestino_SelectedIndexChanged">
|
||||
<asp:DropDownList ID="DdlDireccionDestino" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalClienteVentaDireccion" DataValueField="CveDireccionEnvio" Width="100%">
|
||||
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%--<asp:TextBox ID="TxtDestinoCP" runat="server" Enabled="false" Text="" CssClass="form-control input-sm"></asp:TextBox>--%>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row rowpadding">
|
||||
<label class="col-md-2">F. Salida:</label>
|
||||
<div class="col-md-4">
|
||||
<ul class="list-inline" style="font-size: 12px; margin-top: -10px; margin-left: 0px; margin-bottom: 0px;">
|
||||
<li>
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
|
||||
<asp:TextBox ID="TxtFechaEntregaCP" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<label class="col-md-2">F. Llegada:</label>
|
||||
<div class="col-md-4">
|
||||
<ul class="list-inline" style="font-size: 12px; margin-top: -10px; margin-left: 0px; margin-bottom: 0px;">
|
||||
<li>
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
|
||||
<asp:TextBox ID="TxtFechaLlegadaCP" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<label class="col-md-2">F. Entrega:</label>
|
||||
<div class="col-md-4">
|
||||
<ul class="list-inline" style="font-size: 12px; margin-top: -10px; margin-left: 0px; margin-bottom: 0px;">
|
||||
<li>
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
|
||||
<asp:TextBox ID="TxtFechaEntregaCP" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||
<asp:TextBox ID="TxtFechaLlegadaCP" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -2333,7 +2337,7 @@
|
||||
<div class="row rowpadding">
|
||||
<label class="col-md-2">Distancia:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtDistancia" runat="server" CssClass="form-control input-sm" type="number"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtDistancia" runat="server" CssClass="form-control input-sm" type="number" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
@@ -2569,9 +2573,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td rowspan="2" colspan="1">
|
||||
<div class="portlet light xspadding bordered whitoutcol" style="width: 330px;">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered whitoutcol">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -2701,11 +2707,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered whitoutcol" style="width: 330px;">
|
||||
<div class="portlet light xspadding bordered whitoutcol">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -2728,7 +2736,7 @@
|
||||
<td>GSDB: </td>
|
||||
<td>
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtFordGSDB" CssClass="form-control input-sm" runat="server" MaxLength="5"></asp:TextBox><label></label><i></i>
|
||||
<asp:TextBox ID="TxtFordGSDB" CssClass="form-control input-sm" runat="server" MaxLength="5" Width="90%"></asp:TextBox><label></label><i></i>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -2758,8 +2766,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="portlet light xspadding bordered whitoutcol" style="width: 330px;">
|
||||
<div class="portlet light xspadding bordered whitoutcol">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -2783,7 +2790,7 @@
|
||||
<td>Proveedor: </td>
|
||||
<td>
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="Txt7ElevenNumProveedor" CssClass="form-control input-sm" runat="server" Enabled="False"></asp:TextBox><label></label><i></i>
|
||||
<asp:TextBox ID="Txt7ElevenNumProveedor" CssClass="form-control input-sm" runat="server" Enabled="False" Width="90%"></asp:TextBox><label></label><i></i>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -2791,7 +2798,7 @@
|
||||
<td>Folio: </td>
|
||||
<td>
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="Txt7ElevenFolio" CssClass="form-control input-sm" runat="server"></asp:TextBox><label></label><i></i>
|
||||
<asp:TextBox ID="Txt7ElevenFolio" CssClass="form-control input-sm" runat="server" Width="90%"></asp:TextBox><label></label><i></i>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -2799,7 +2806,7 @@
|
||||
<td>Tienda: </td>
|
||||
<td>
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox type="number" CssClass="form-control input-sm" ID="Txt7ElevenTienda" runat="server"></asp:TextBox><label></label><i></i>
|
||||
<asp:TextBox type="number" CssClass="form-control input-sm" ID="Txt7ElevenTienda" runat="server" Width="90%"></asp:TextBox><label></label><i></i>
|
||||
</div>
|
||||
<%--<ajax:MaskedEditExtender runat="server" ID="MEE7ElevenTienda" TargetControlID="Txt7ElevenTienda" MaskType="Number" Mask="999999" AcceptNegative="Left" MessageValidatorTip="true"></ajax:MaskedEditExtender>--%>
|
||||
</td>
|
||||
@@ -2828,16 +2835,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td rowspan="1" colspan="1">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered whitoutcol" style="width: 330px;">
|
||||
<div class="portlet light xspadding bordered whitoutcol">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Detallista</span>
|
||||
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
@@ -2925,7 +2931,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered whitoutcol" style="width: 450px;">
|
||||
<div class="portlet light xspadding bordered whitoutcol">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -2941,16 +2947,17 @@
|
||||
</div>
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="display: none;">
|
||||
<div class="form-body">
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="modal-body col-md-6" style="border-right: 1px solid lightgray;">
|
||||
<div class="col-md-6" style="border-right: 1px solid lightgray;">
|
||||
<asp:UpdatePanel runat="server" ID="UpComplementos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:RadioButtonList ID="RblComplementos" runat="server" AutoPostBack="true" CssClass="rbl" DataValueField="CveVentaComplemento" DataTextField="VentaComplemento" RepeatLayout="Table">
|
||||
<asp:RadioButtonList ID="RblComplementos" runat="server" AutoPostBack="true" CssClass="rbl" DataValueField="CveVentaComplemento" DataTextField="VentaComplemento" RepeatLayout="Table" Width="95%">
|
||||
</asp:RadioButtonList>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-body col-md-6">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server" ID="UpDatosComplementos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table>
|
||||
@@ -3014,7 +3021,7 @@
|
||||
<tr id="trContaComplementos" runat="Server" visible="False">
|
||||
<td>Id Conta:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtIdConta" runat="server" MaxLength="6" Width="100px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtIdConta" runat="server" MaxLength="6" Width="90%"></asp:TextBox>
|
||||
<asp:RegularExpressionValidator ID="REVIdConta" runat="server" ControlToValidate="TxtIdConta" Display="None" ErrorMessage="El campo <b>''Id Conta''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationExpression="^([1-9]{1}[\d]{0,2}(\,[\d]{3})*(\.[\d]{0,4})?|[1-9]{1}[\d]{0,}(\.[\d]{0,4})?|0(\.[\d]{0,2})?|(\.[\d]{1,4})?)$" ValidationGroup="GrpComplementosTimbrado"></asp:RegularExpressionValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEIdConta" runat="server" HighlightCssClass="vco" TargetControlID="REVIdConta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
@@ -3029,13 +3036,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td rowspan="1" colspan="2"></td>
|
||||
<td rowspan="1" colspan="1"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -31425,6 +31425,10 @@ Partial Class Ventas
|
||||
DdlTipoRetencion.Visible = True
|
||||
End If
|
||||
|
||||
If DivCartaPorte.Visible Then
|
||||
HabilitarControlesCartaPorte(True)
|
||||
End If
|
||||
|
||||
UpnTools.Update()
|
||||
UpCliente.Update()
|
||||
UpParametros.Update()
|
||||
@@ -31438,7 +31442,7 @@ Partial Class Ventas
|
||||
UpParametros.Update()
|
||||
UpINV.Update()
|
||||
UpFacturasRelacionadas.Update()
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -34062,12 +34066,12 @@ Partial Class Ventas
|
||||
ValidaConfiguracionVehiculo()
|
||||
End Sub
|
||||
Public Sub CargaVentaCortePorte(CveVenta As Integer)
|
||||
TxtFechaEntregaCP.Enabled = False
|
||||
TxtFechaLlegadaCP.Enabled = False
|
||||
|
||||
Dim CveEntregaAlmacen As Integer = -1
|
||||
Dim CveDireccionOrigen As Integer = -1
|
||||
Dim CveDireccionDestino As Integer = -1
|
||||
Dim CveCamionRemolque1 As Integer = -1
|
||||
Dim CveCamionRemolque2 As Integer = -1
|
||||
Dim CveConfigAutoTransporte As Integer = -1
|
||||
|
||||
Using ObjGral As New ClsGenerales
|
||||
If ObjGral.GetGralTimbre(-1, "Ing", MinFecha, MaxFecha, 0, UsuarioActual.CveEmpresa, -1, CveVenta:=CveVenta) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
|
||||
@@ -34076,20 +34080,24 @@ Partial Class Ventas
|
||||
Me.CveTimbreCartaPorteVenta = RowCP("CveTimbre").ToString().ToEntero()
|
||||
If CveTimbreCartaPorteVenta > 0 Then
|
||||
ChkEmitirCartaPorte.Checked = True
|
||||
ChkEmitirCartaPorte.Enabled = False
|
||||
|
||||
|
||||
CveEntregaAlmacen = RowCP("CveEntregaAlmacen").ToString().ToEntero()
|
||||
|
||||
CveDireccionOrigen = RowCP("CveDireccionOrigen").ToString().ToEntero()
|
||||
CveDireccionDestino = RowCP("CveDireccionDestino").ToString().ToEntero()
|
||||
|
||||
TxtFechaEntregaCP.Text = RowCP("FechaEntrega").ToString()
|
||||
TxtFechaLlegadaCP.Text = RowCP("FechaLlegada").ToString()
|
||||
TxtFechaEntregaCP.Text = RowCP("FechaEntrega").ToString().ToDateTime().ToString("dd/MM/yyyy HH:mm")
|
||||
TxtFechaLlegadaCP.Text = RowCP("FechaLlegada").ToString().ToDateTime().ToString("dd/MM/yyyy HH:mm")
|
||||
TxtDistancia.Text = RowCP("Distancia").ToString()
|
||||
|
||||
DdlChofer.SelectedValueExist(RowCP("CveChofer").ToString())
|
||||
DdlUnidadCamion.SelectedValueExist(RowCP("CveCamion").ToString())
|
||||
|
||||
CveCamionRemolque1 = RowCP("CveCamionRemolque1").ToString().ToEntero()
|
||||
CveCamionRemolque2 = RowCP("CveCamionRemolque2").ToString().ToEntero()
|
||||
|
||||
CveConfigAutoTransporte = RowCP("CveConfigAutoTransporte").ToString().ToEntero()
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -34098,7 +34106,6 @@ Partial Class Ventas
|
||||
DtMercancias = ObjGral.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
End Using
|
||||
|
||||
If ChkEmitirCartaPorte.Checked AndAlso CveCliente > 0 Then
|
||||
@@ -34119,18 +34126,54 @@ Partial Class Ventas
|
||||
|
||||
GvMercanciasCP.DataSource = DtMercancias
|
||||
GvMercanciasCP.DataBind()
|
||||
|
||||
If DdlUnidadCamion.SelectedValue.ToEntero() > 0 Then
|
||||
If CveConfigAutoTransporte > 0 Then
|
||||
DvRemolque1.Visible = False
|
||||
DvRemolque2.Visible = False
|
||||
|
||||
DdlRemolque1.SelectedValueExist(-1)
|
||||
DdlRemolque2.SelectedValueExist(-1)
|
||||
|
||||
DdlConfigAuto.SelectedValueExist(CveConfigAutoTransporte.ToString())
|
||||
DdlConfigAuto_SelectedIndexChanged(DdlConfigAuto, EventArgs.Empty)
|
||||
|
||||
If CveCamionRemolque1 > 0 Then
|
||||
DdlRemolque1.SelectedValueExist(CveCamionRemolque1.ToString())
|
||||
DdlRemolque1_SelectedIndexChanged(DdlRemolque1, EventArgs.Empty)
|
||||
|
||||
If CveCamionRemolque2 > 0 Then
|
||||
DdlRemolque2.SelectedValueExist(CveCamionRemolque2.ToString())
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
TmpDTDireccionCP = Nothing
|
||||
End If
|
||||
|
||||
DdlChofer.Enabled = False
|
||||
DdlUnidadCamion.Enabled = False
|
||||
DdlDireccionOrigen.Enabled = False
|
||||
DdlDireccionDestino.Enabled = False
|
||||
HabilitarControlesCartaPorte(False)
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub HabilitarControlesCartaPorte(Habilitar As Boolean)
|
||||
ChkEmitirCartaPorte.Enabled = Habilitar
|
||||
TxtFechaEntregaCP.Enabled = Habilitar
|
||||
TxtFechaLlegadaCP.Enabled = Habilitar
|
||||
DdlChofer.Enabled = Habilitar
|
||||
DdlUnidadCamion.Enabled = Habilitar
|
||||
DdlConfigAuto.Enabled = Habilitar
|
||||
DdlRemolque1.Enabled = Habilitar
|
||||
DdlRemolque2.Enabled = Habilitar
|
||||
DdlDireccionOrigen.Enabled = Habilitar
|
||||
DdlDireccionDestino.Enabled = Habilitar
|
||||
TxtDistancia.Enabled = Habilitar
|
||||
LnkAgregarMercancia.Enabled = Habilitar
|
||||
GvMercanciasCP.Columns(3).Visible = Habilitar
|
||||
End Sub
|
||||
|
||||
Private Sub ValidaConfiguracionVehiculo()
|
||||
DvRemolque1.Visible = False
|
||||
DvRemolque2.Visible = False
|
||||
@@ -34288,93 +34331,93 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property SucursalOrigenCP As Modelos.SucursalModel
|
||||
Get
|
||||
If ViewState("SucursalOrigenCP") Is Nothing Then
|
||||
Return Nothing
|
||||
End If
|
||||
Return DirectCast(ViewState("SucursalOrigenCP"), Modelos.SucursalModel)
|
||||
End Get
|
||||
Set(value As Modelos.SucursalModel)
|
||||
ViewState("SucursalOrigenCP") = value
|
||||
End Set
|
||||
End Property
|
||||
Property SucursalDestinoCP As Modelos.SucursalModel
|
||||
Get
|
||||
If ViewState("SucursalDestinoCP") Is Nothing Then
|
||||
Return Nothing
|
||||
End If
|
||||
Return DirectCast(ViewState("SucursalDestinoCP"), Modelos.SucursalModel)
|
||||
End Get
|
||||
Set(value As Modelos.SucursalModel)
|
||||
ViewState("SucursalDestinoCP") = value
|
||||
End Set
|
||||
End Property
|
||||
'Property SucursalOrigenCP As Modelos.SucursalModel
|
||||
' Get
|
||||
' If ViewState("SucursalOrigenCP") Is Nothing Then
|
||||
' Return Nothing
|
||||
' End If
|
||||
' Return DirectCast(ViewState("SucursalOrigenCP"), Modelos.SucursalModel)
|
||||
' End Get
|
||||
' Set(value As Modelos.SucursalModel)
|
||||
' ViewState("SucursalOrigenCP") = value
|
||||
' End Set
|
||||
'End Property
|
||||
'Property SucursalDestinoCP As Modelos.SucursalModel
|
||||
' Get
|
||||
' If ViewState("SucursalDestinoCP") Is Nothing Then
|
||||
' Return Nothing
|
||||
' End If
|
||||
' Return DirectCast(ViewState("SucursalDestinoCP"), Modelos.SucursalModel)
|
||||
' End Get
|
||||
' Set(value As Modelos.SucursalModel)
|
||||
' ViewState("SucursalDestinoCP") = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Private Sub CargaDireccionSucursalOrigen(Row As DataRow)
|
||||
If SucursalOrigenCP Is Nothing Then
|
||||
SucursalOrigenCP = New Modelos.SucursalModel
|
||||
Else
|
||||
SucursalOrigenCP = Nothing
|
||||
SucursalOrigenCP = New Modelos.SucursalModel
|
||||
End If
|
||||
'Private Sub CargaDireccionSucursalOrigen(Row As DataRow)
|
||||
' If SucursalOrigenCP Is Nothing Then
|
||||
' SucursalOrigenCP = New Modelos.SucursalModel
|
||||
' Else
|
||||
' SucursalOrigenCP = Nothing
|
||||
' SucursalOrigenCP = New Modelos.SucursalModel
|
||||
' End If
|
||||
|
||||
Dim SBDomicilioSucursal As New StringBuilder()
|
||||
Try
|
||||
If Row IsNot Nothing Then
|
||||
' Dim SBDomicilioSucursal As New StringBuilder()
|
||||
' Try
|
||||
' If Row IsNot Nothing Then
|
||||
|
||||
SucursalOrigenCP.Direccion = Row("Calle").ToString()
|
||||
SucursalOrigenCP.NoExt = Row("NoExt").ToString()
|
||||
SucursalOrigenCP.NoInt = Row("NoInt").ToString()
|
||||
SucursalOrigenCP.Colonia = Row("Colonia").ToString()
|
||||
SucursalOrigenCP.CP = Row("CP").ToString()
|
||||
SucursalOrigenCP.Municipio = Row("Municipio").ToString()
|
||||
SucursalOrigenCP.CveEstado = Row("CveEstado").ToString().ToEntero()
|
||||
SucursalOrigenCP.Estado = Row("Estado").ToString()
|
||||
SucursalOrigenCP.CvePais = Row("CvePais").ToString().ToEntero()
|
||||
SucursalOrigenCP.Pais = Row("Pais").ToString()
|
||||
' SucursalOrigenCP.Direccion = Row("Calle").ToString()
|
||||
' SucursalOrigenCP.NoExt = Row("NoExt").ToString()
|
||||
' SucursalOrigenCP.NoInt = Row("NoInt").ToString()
|
||||
' SucursalOrigenCP.Colonia = Row("Colonia").ToString()
|
||||
' SucursalOrigenCP.CP = Row("CP").ToString()
|
||||
' SucursalOrigenCP.Municipio = Row("Municipio").ToString()
|
||||
' SucursalOrigenCP.CveEstado = Row("CveEstado").ToString().ToEntero()
|
||||
' SucursalOrigenCP.Estado = Row("Estado").ToString()
|
||||
' SucursalOrigenCP.CvePais = Row("CvePais").ToString().ToEntero()
|
||||
' SucursalOrigenCP.Pais = Row("Pais").ToString()
|
||||
|
||||
SBDomicilioSucursal.AppendFormat("{0}", Row("Calle").ToString())
|
||||
' SBDomicilioSucursal.AppendFormat("{0}", Row("Calle").ToString())
|
||||
|
||||
If Row("NoInt").ToString().Length > 0 Then
|
||||
SBDomicilioSucursal.AppendFormat(", No.Int: {0}", Row("NoInt").ToString())
|
||||
End If
|
||||
' If Row("NoInt").ToString().Length > 0 Then
|
||||
' SBDomicilioSucursal.AppendFormat(", No.Int: {0}", Row("NoInt").ToString())
|
||||
' End If
|
||||
|
||||
If Row("Colonia").ToString().Length > 0 Then
|
||||
SBDomicilioSucursal.AppendFormat(", Col: {0}", Row("Colonia").ToString())
|
||||
End If
|
||||
' If Row("Colonia").ToString().Length > 0 Then
|
||||
' SBDomicilioSucursal.AppendFormat(", Col: {0}", Row("Colonia").ToString())
|
||||
' End If
|
||||
|
||||
If Row("CP").ToString().ToEntero > 0 Then
|
||||
SBDomicilioSucursal.AppendFormat(", CP: {0}", Row("CP").ToString())
|
||||
End If
|
||||
' If Row("CP").ToString().ToEntero > 0 Then
|
||||
' SBDomicilioSucursal.AppendFormat(", CP: {0}", Row("CP").ToString())
|
||||
' End If
|
||||
|
||||
If Row("NoExt").ToString().Length > 0 Then
|
||||
SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", Row("NoExt").ToString())
|
||||
End If
|
||||
' If Row("NoExt").ToString().Length > 0 Then
|
||||
' SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", Row("NoExt").ToString())
|
||||
' End If
|
||||
|
||||
Dim CiudadSucursal As String = String.Format("{0},{1}", Row("Municipio").ToString(), Row("Estado").ToString())
|
||||
If CiudadSucursal.Length > 0 Then
|
||||
SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
|
||||
End If
|
||||
' Dim CiudadSucursal As String = String.Format("{0},{1}", Row("Municipio").ToString(), Row("Estado").ToString())
|
||||
' If CiudadSucursal.Length > 0 Then
|
||||
' SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
|
||||
' End If
|
||||
|
||||
If Row("Pais").ToString().Length > 0 Then
|
||||
SBDomicilioSucursal.AppendFormat(", {0}", Row("Pais").ToString())
|
||||
End If
|
||||
' If Row("Pais").ToString().Length > 0 Then
|
||||
' SBDomicilioSucursal.AppendFormat(", {0}", Row("Pais").ToString())
|
||||
' End If
|
||||
|
||||
If Not String.IsNullOrEmpty(Row("Telefono").ToString()) Then
|
||||
SucursalOrigenCP.TelefonoSucursal = Row("Telefono").ToString()
|
||||
End If
|
||||
End If
|
||||
' If Not String.IsNullOrEmpty(Row("Telefono").ToString()) Then
|
||||
' SucursalOrigenCP.TelefonoSucursal = Row("Telefono").ToString()
|
||||
' End If
|
||||
' End If
|
||||
|
||||
Catch ex As Exception
|
||||
SBDomicilioSucursal.Clear()
|
||||
GuardaLog(ex.ToString())
|
||||
End Try
|
||||
' Catch ex As Exception
|
||||
' SBDomicilioSucursal.Clear()
|
||||
' GuardaLog(ex.ToString())
|
||||
' End Try
|
||||
|
||||
'TxtOrigenCP.Text = SBDomicilioSucursal.ToString
|
||||
' 'TxtOrigenCP.Text = SBDomicilioSucursal.ToString
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
' UpEmitirTransitorio.Update()
|
||||
'End Sub
|
||||
|
||||
Protected Sub DdlDireccionEnvio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
'If SucursalDestinoCP Is Nothing Then
|
||||
@@ -34410,73 +34453,73 @@ Partial Class Ventas
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlDireccionOrigen_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If SucursalOrigenCP Is Nothing Then
|
||||
SucursalOrigenCP = New Modelos.SucursalModel
|
||||
Else
|
||||
SucursalOrigenCP = Nothing
|
||||
SucursalOrigenCP = New Modelos.SucursalModel
|
||||
End If
|
||||
'Protected Sub DdlDireccionOrigen_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' If SucursalOrigenCP Is Nothing Then
|
||||
' SucursalOrigenCP = New Modelos.SucursalModel
|
||||
' Else
|
||||
' SucursalOrigenCP = Nothing
|
||||
' SucursalOrigenCP = New Modelos.SucursalModel
|
||||
' End If
|
||||
|
||||
|
||||
If TmpDTDireccionCP IsNot Nothing AndAlso TmpDTDireccionCP.FiltraParametros(String.Format("CveDireccionEnvio = {0}", DdlDireccionOrigen.SelectedValue.ToEntero())).Rows.Count > 0 Then
|
||||
' If TmpDTDireccionCP IsNot Nothing AndAlso TmpDTDireccionCP.FiltraParametros(String.Format("CveDireccionEnvio = {0}", DdlDireccionOrigen.SelectedValue.ToEntero())).Rows.Count > 0 Then
|
||||
|
||||
Dim Row As DataRow = TmpDTDireccionCP.FiltroPrimero(String.Format("CveDireccionEnvio = {0}", DdlDireccionOrigen.SelectedValue.ToEntero()))
|
||||
If Row IsNot Nothing Then
|
||||
' Dim Row As DataRow = TmpDTDireccionCP.FiltroPrimero(String.Format("CveDireccionEnvio = {0}", DdlDireccionOrigen.SelectedValue.ToEntero()))
|
||||
' If Row IsNot Nothing Then
|
||||
|
||||
SucursalOrigenCP.Direccion = Row("EnvioDireccion").ToString()
|
||||
SucursalOrigenCP.Colonia = Row("EnvioColonia").ToString()
|
||||
SucursalOrigenCP.Municipio = Row("EnvioCiudad").ToString()
|
||||
SucursalOrigenCP.CveEstado = Row("CveEstado").ToString().ToEntero()
|
||||
SucursalOrigenCP.Estado = Row("EnvioEstado").ToString()
|
||||
SucursalOrigenCP.CvePais = Row("CvePais").ToString().ToEntero()
|
||||
SucursalOrigenCP.Pais = Row("Pais").ToString()
|
||||
SucursalOrigenCP.CP = Row("EnvioCP").ToString()
|
||||
' SucursalOrigenCP.Direccion = Row("EnvioDireccion").ToString()
|
||||
' SucursalOrigenCP.Colonia = Row("EnvioColonia").ToString()
|
||||
' SucursalOrigenCP.Municipio = Row("EnvioCiudad").ToString()
|
||||
' SucursalOrigenCP.CveEstado = Row("CveEstado").ToString().ToEntero()
|
||||
' SucursalOrigenCP.Estado = Row("EnvioEstado").ToString()
|
||||
' SucursalOrigenCP.CvePais = Row("CvePais").ToString().ToEntero()
|
||||
' SucursalOrigenCP.Pais = Row("Pais").ToString()
|
||||
' SucursalOrigenCP.CP = Row("EnvioCP").ToString()
|
||||
|
||||
'TxtDestinoCP.Text = String.Format("{0} col. {1},CP:{2}, {3},{4},{5}", SucursalDestinoCP.Direccion, SucursalDestinoCP.Colonia, SucursalDestinoCP.CP, SucursalDestinoCP.Municipio, SucursalDestinoCP.Estado, SucursalDestinoCP.Pais)
|
||||
Else
|
||||
'TxtDestinoCP.Text = ""
|
||||
End If
|
||||
Else
|
||||
'TxtDestinoCP.Text = ""
|
||||
End If
|
||||
' 'TxtDestinoCP.Text = String.Format("{0} col. {1},CP:{2}, {3},{4},{5}", SucursalDestinoCP.Direccion, SucursalDestinoCP.Colonia, SucursalDestinoCP.CP, SucursalDestinoCP.Municipio, SucursalDestinoCP.Estado, SucursalDestinoCP.Pais)
|
||||
' Else
|
||||
' 'TxtDestinoCP.Text = ""
|
||||
' End If
|
||||
' Else
|
||||
' 'TxtDestinoCP.Text = ""
|
||||
' End If
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
' UpEmitirTransitorio.Update()
|
||||
'End Sub
|
||||
|
||||
Protected Sub DdlDireccionDestino_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If SucursalDestinoCP Is Nothing Then
|
||||
SucursalDestinoCP = New Modelos.SucursalModel
|
||||
Else
|
||||
SucursalDestinoCP = Nothing
|
||||
SucursalDestinoCP = New Modelos.SucursalModel
|
||||
End If
|
||||
'Protected Sub DdlDireccionDestino_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' If SucursalDestinoCP Is Nothing Then
|
||||
' SucursalDestinoCP = New Modelos.SucursalModel
|
||||
' Else
|
||||
' SucursalDestinoCP = Nothing
|
||||
' SucursalDestinoCP = New Modelos.SucursalModel
|
||||
' End If
|
||||
|
||||
|
||||
If TmpDTDireccionCP IsNot Nothing AndAlso TmpDTDireccionCP.FiltraParametros(String.Format("CveDireccionEnvio = {0}", DdlDireccionDestino.SelectedValue.ToEntero())).Rows.Count > 0 Then
|
||||
' If TmpDTDireccionCP IsNot Nothing AndAlso TmpDTDireccionCP.FiltraParametros(String.Format("CveDireccionEnvio = {0}", DdlDireccionDestino.SelectedValue.ToEntero())).Rows.Count > 0 Then
|
||||
|
||||
Dim Row As DataRow = TmpDTDireccionCP.FiltroPrimero(String.Format("CveDireccionEnvio = {0}", DdlDireccionDestino.SelectedValue.ToEntero()))
|
||||
If Row IsNot Nothing Then
|
||||
' Dim Row As DataRow = TmpDTDireccionCP.FiltroPrimero(String.Format("CveDireccionEnvio = {0}", DdlDireccionDestino.SelectedValue.ToEntero()))
|
||||
' If Row IsNot Nothing Then
|
||||
|
||||
SucursalDestinoCP.Direccion = Row("EnvioDireccion").ToString()
|
||||
SucursalDestinoCP.Colonia = Row("EnvioColonia").ToString()
|
||||
SucursalDestinoCP.Municipio = Row("EnvioCiudad").ToString()
|
||||
SucursalDestinoCP.CveEstado = Row("CveEstado").ToString().ToEntero()
|
||||
SucursalDestinoCP.Estado = Row("EnvioEstado").ToString()
|
||||
SucursalDestinoCP.CvePais = Row("CvePais").ToString().ToEntero()
|
||||
SucursalDestinoCP.Pais = Row("Pais").ToString()
|
||||
SucursalDestinoCP.CP = Row("EnvioCP").ToString()
|
||||
' SucursalDestinoCP.Direccion = Row("EnvioDireccion").ToString()
|
||||
' SucursalDestinoCP.Colonia = Row("EnvioColonia").ToString()
|
||||
' SucursalDestinoCP.Municipio = Row("EnvioCiudad").ToString()
|
||||
' SucursalDestinoCP.CveEstado = Row("CveEstado").ToString().ToEntero()
|
||||
' SucursalDestinoCP.Estado = Row("EnvioEstado").ToString()
|
||||
' SucursalDestinoCP.CvePais = Row("CvePais").ToString().ToEntero()
|
||||
' SucursalDestinoCP.Pais = Row("Pais").ToString()
|
||||
' SucursalDestinoCP.CP = Row("EnvioCP").ToString()
|
||||
|
||||
'TxtDestinoCP.Text = String.Format("{0} col. {1},CP:{2}, {3},{4},{5}", SucursalDestinoCP.Direccion, SucursalDestinoCP.Colonia, SucursalDestinoCP.CP, SucursalDestinoCP.Municipio, SucursalDestinoCP.Estado, SucursalDestinoCP.Pais)
|
||||
Else
|
||||
'TxtDestinoCP.Text = ""
|
||||
End If
|
||||
Else
|
||||
'TxtDestinoCP.Text = ""
|
||||
End If
|
||||
' 'TxtDestinoCP.Text = String.Format("{0} col. {1},CP:{2}, {3},{4},{5}", SucursalDestinoCP.Direccion, SucursalDestinoCP.Colonia, SucursalDestinoCP.CP, SucursalDestinoCP.Municipio, SucursalDestinoCP.Estado, SucursalDestinoCP.Pais)
|
||||
' Else
|
||||
' 'TxtDestinoCP.Text = ""
|
||||
' End If
|
||||
' Else
|
||||
' 'TxtDestinoCP.Text = ""
|
||||
' End If
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
' UpEmitirTransitorio.Update()
|
||||
'End Sub
|
||||
Protected Sub LnkAgregarMercancia_Click(sender As Object, e As EventArgs)
|
||||
TxtCantidadMercancia.Text = ""
|
||||
'DdlPSMercancia.SelectedValue = ""
|
||||
|
||||
Reference in New Issue
Block a user