Modificaciones en el AddContratos y PA_ContratosGet para que me diera la CveTipoAF
This commit is contained in:
@@ -319,7 +319,7 @@ Public Class ClsContratos
|
||||
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 FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False, Optional DiaMesFacturacion As Integer = 1, Optional ObservacionesGenerales As String = "") As Integer
|
||||
Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False, Optional DiaMesFacturacion As Integer = 1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = -1) As Integer
|
||||
|
||||
Dim Retorno As Integer = -1
|
||||
DataAdapter("PA_Con_ContratosAdd")
|
||||
@@ -375,6 +375,7 @@ Public Class ClsContratos
|
||||
.Add("@FacturacionCiclicaAutomatico", SqlDbType.Bit).Value = FacturacionCiclicaAutomatico
|
||||
.Add("@DiaMesFacturacion", SqlDbType.TinyInt).Value = DiaMesFacturacion
|
||||
.Add("@ObservacionesGenerales", SqlDbType.VarChar).Value = ObservacionesGenerales
|
||||
.Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlTransporte" AppendDataBoundItems="true" DataTextField="Descripcion"
|
||||
DataValueField="CveActivoFijo" Class="table-group-action-input form-control input-inline text-center"
|
||||
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline text-center"
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTransporte"
|
||||
|
||||
@@ -74,6 +74,7 @@ Partial Class ListadoContratos
|
||||
If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
|
||||
CveEstatusInicial = ObjContratos.DtResultados.FiltroPrimeroValor("CveContratoEstatus", "TipoEstatus=1").ToEntero
|
||||
End If
|
||||
|
||||
CveContratoHijo = ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero)
|
||||
|
||||
|
||||
@@ -107,7 +108,7 @@ Partial Class ListadoContratos
|
||||
|
||||
If Editar = True Then
|
||||
ContratoEditado.Commit()
|
||||
Alert("El Contrato se modificó Correctamente.")
|
||||
Alert("El contrato se modificó correctamente.")
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -125,6 +126,7 @@ Partial Class ListadoContratos
|
||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Page.Response.Write("<script>console.log('El resultado de tu variable" + GvRow.DataKey("CveTipoAF") + "')</script>")
|
||||
Dim fechaInicial As DateTime
|
||||
Dim fechaFinal As DateTime
|
||||
|
||||
@@ -132,7 +134,7 @@ Partial Class ListadoContratos
|
||||
TxtDescripcion.Text = GvRow.DataKey("DescripcionContrato")
|
||||
TxtObservaciones.Text = GvRow.DataKey("DescripcionContrato")
|
||||
TxtUbicacion.Text = GvRow.DataKey("Ubicacion")
|
||||
DdlTransporte.SelectedValue = GvRow.DataKey("CveTipoAF")
|
||||
'DdlTransporte.SelectedValue = GvRow.DataKey("CveActivoFijo")
|
||||
If DateTime.TryParse(GvRow.DataKey("FechaInicial").ToString, fechaInicial) And DateTime.TryParse(GvRow.DataKey("FechaFinal").ToString, fechaFinal) Then
|
||||
TxtFechaSalida.Text = fechaInicial.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
TxtFechaRegreso.Text = fechaFinal.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
@@ -150,7 +152,10 @@ Partial Class ListadoContratos
|
||||
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
Try
|
||||
|
||||
ObjContratos.RemoveContrato(GvRow.DataKey("CveContrato").ToEntero, UsuarioActual.CveEmpresa)
|
||||
Alert("Contrato eliminado correctamente")
|
||||
|
||||
ObjContratos.Commit()
|
||||
Response.Redirect(Request.RawUrl)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user