VyA RepContratoCalendario, rdlc rep anomalias, Compras gv Inv requerir lote y fecha de caducidad

This commit is contained in:
rakcsle
2024-11-19 15:46:09 -07:00
parent 556a479822
commit c800ccc7af
6 changed files with 4029 additions and 3730 deletions

View File

@@ -245,7 +245,8 @@ Partial Class RepContratosCalendario
strData.AppendLine($"color: am4core.color('" & String.Format("#{0:X6}", random.Next(16777216)) & "'),")
strData.AppendLine($"cveContrato: {Row("CveContrato").ToString.ToEntero},")
strData.AppendLine($"contrato: '{Row("NumeroContrato").ToString}',")
strData.AppendLine($"fechaFinalViaje: '{FF.ToString("yyyy-MM-dd HH:mm:ss")}'")
strData.AppendLine($"fechaFinalViaje: '{FF.ToString("yyyy-MM-dd HH:mm:ss")}',")
strData.AppendLine($"cliente: '{Row("NombreComercial").ToString.Replace("'", "")}'")
strData.AppendLine("},")
@@ -564,6 +565,82 @@ Partial Class RepContratosCalendario
End If
End Sub
Protected Sub BtnCargaContratoCalendario_Click(sender As Object, e As EventArgs)
Dim CveContratoConsulta As Integer = HdnCveContrato.Value.ToEntero
If CveContratoConsulta > 0 Then
Dim Objcontrato As New ClsContratos
If Objcontrato.GetContratos(CveContratoConsulta, UsuarioActual.CveEmpresa) AndAlso Objcontrato.DtResultados.Rows.Count > 0 Then
Dim DRow As DataRow
DRow = Objcontrato.DtResultados.Rows(0)
'Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim NumChoferes As Integer = DRow("NumChoferes").ToString.ToEntero
TxtFolio.Text = DRow("NumeroContrato").ToString
TxtCantidadPasajeros.Text = DRow("CantidadPasajeros").ToString
DdlClientes.SelectedValue = DRow("CveCliente").ToString
DdlClientes.SelectedText = DRow("NombreComercial").ToString
TxtDescripcion.Text = DRow("DescripcionContrato").ToString
TxtObservaciones.Text = DRow("Observaciones").ToString
TxtUbicacion.Text = DRow("Ubicacion").ToString
TxtFechaSalida.Text = Convert.ToDateTime(DRow("FechaInicial")).ToString("dd/MM/yyyy HH:mm:ss")
TxtFechaRegreso.Text = Convert.ToDateTime(DRow("FechaFinal")).ToString("dd/MM/yyyy HH:mm:ss ")
TxtMoneda.Text = DRow("Moneda").ToString
'Requeridos
DdlChofer.SelectedValueExist(DRow("CveChofer").ToString)
DdlChofer2.SelectedValueExist(DRow("CveChofer2").ToString)
chkSegundoChofer.Checked = If(NumChoferes = 2, True, False)
DdlEstatusContrato.SelectedValueExist(DRow("CveContratosEstatus").ToString)
DdlSubProyectoModal.SelectedValueExist(DRow("CveSubProyecto").ToString)
DdlTipoAF.SelectedValueExist(DRow("CveTipoAF").ToString)
DdlTipoAF_SelectedIndexChanged(Nothing, Nothing)
DdlAF.SelectedValueExist(DRow("CveAF").ToString)
HidCveAF.Value = "-1"
HidCveAFDes.Value = ""
If DRow("CveAF").ToString.ToEntero > 0 Then
HidCveAF.Value = DRow("CveAF").ToString.ToString
HidCveAFDes.Value = DdlAF.SelectedItem.Text
End If
TxtMotivoCambioUnidad.Text = ""
DVMotivoCambioAF.Visible = False
HypRemision.Text = DRow("RemisionSerieFolio").ToString
HypRemision.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={DRow("CveVentaRemision").ToString}"
If DRow("RemisionSaldo").ToString.ToDecimal > 0 Then
LblSaldo.Text = $"Saldo {DRow("RemisionSaldo").ToString.ToDecimal.ToString("###,###,###.00")}"
Else
LblSaldo.Text = ""
End If
CveContrato = CveContratoConsulta
OcultarMostrarSegundoChofer()
UpCommando.Update()
UpModal.Update()
RegistraScript("$('#ModalActualizar').modal('show');")
End If
Objcontrato.Dispose()
Else
Alert("Contrato no especificado", TipoMensaje.MsgAdvertencia)
End If
End Sub
@@ -597,11 +674,11 @@ Partial Class RepContratosCalendario
End If
End If
If HidCveAF.Value.ToEntero <> DdlAF.SelectedValue.ToEntero Then
If Not objGenerales.AddHistorialBitacora(465, -1, -1, -1, -1, -1, -1, -1, DdlAF.SelectedItem.Text, HidCveAFDes.Value, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, TxtMotivoCambioUnidad.Text, "", "", CveContrato:=CveContrato) Then
TieneError = True
End If
End If
'If HidCveAF.Value.ToEntero <> DdlAF.SelectedValue.ToEntero Then
' If Not objGenerales.AddHistorialBitacora(465, -1, -1, -1, -1, -1, -1, -1, DdlAF.SelectedItem.Text, HidCveAFDes.Value, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, TxtMotivoCambioUnidad.Text, "", "", CveContrato:=CveContrato) Then
' TieneError = True
' End If
'End If
If ObjContratos.UpdateContratos(CveContrato, TxtFolio.Text, TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", DdlSubProyectoModal.SelectedValue.ToEntero,
-1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=34,
@@ -718,6 +795,7 @@ Partial Class RepContratosCalendario
UpModal.Update()
myModalLabel.InnerText = "Contrato: " & HdnNumContrato.Value
RegistraScript("$('#ModalActualizar').modal('show');")
End Sub
Protected Sub chkSegundoChofer_CheckedChanged(sender As Object, e As EventArgs)
@@ -857,4 +935,6 @@ Partial Class RepContratosCalendario
CargaCronograma(DdlTipoVistaCalendario.SelectedValue.ToEntero)
End Sub
End Class