-option explicit
This commit is contained in:
@@ -590,8 +590,8 @@ Partial Class Contratos_Default
|
||||
'TabContratosGastos.Visible = False
|
||||
|
||||
'DONDE OCUPA ALMACEN
|
||||
Dim CveTipoAlmacenOrigen = "12,15"
|
||||
Dim CveTipoAlmacenDestino = "11,12"
|
||||
Dim CveTipoAlmacenOrigen As String = "12,15"
|
||||
Dim CveTipoAlmacenDestino As String = "11,12"
|
||||
If TipoContrato.Contiene({7, 9, 13, 16, 18, 21, 27}) Then
|
||||
RowAlmacen.Visible = True
|
||||
If TipoContrato.Contiene(7, 9, 13, 21, 27) Then
|
||||
@@ -603,7 +603,7 @@ Partial Class Contratos_Default
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim CveOrigen = DdlAlmacenOrigen.SelectedValue
|
||||
Dim CveOrigen As String = DdlAlmacenOrigen.SelectedValue
|
||||
DdlAlmacenOrigen.Items.Clear()
|
||||
DdlAlmacenOrigen.SelectedValue = "-1"
|
||||
DdlAlmacenOrigen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
@@ -616,7 +616,7 @@ Partial Class Contratos_Default
|
||||
DdlAlmacenOrigen.SelectedValueExist(CveOrigen)
|
||||
End If
|
||||
|
||||
Dim CveDestino = DdlAlmacenDestino.SelectedValue
|
||||
Dim CveDestino As String = DdlAlmacenDestino.SelectedValue
|
||||
DdlAlmacenDestino.Items.Clear()
|
||||
DdlAlmacenDestino.SelectedValue = "-1"
|
||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
@@ -935,7 +935,7 @@ Partial Class Contratos_Default
|
||||
#Region " CARGA DATOS "
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjContratos As New ClsContratos()
|
||||
Dim Ruta = Request.ApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
Dim Ruta As String = Request.ApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
DivTipoContrato.Visible = False
|
||||
|
||||
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
@@ -1339,11 +1339,11 @@ Partial Class Contratos_Default
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim TieneError = False
|
||||
Dim Modificado = False
|
||||
Dim TieneError As Boolean = False
|
||||
Dim Modificado As Boolean = False
|
||||
' Dim Extension = Session("FileExtension").ToString
|
||||
Dim Archivo = Session("FileUpload").ToString
|
||||
Dim Ruta = Session("FileFolder").ToString
|
||||
Dim Archivo As String = Session("FileUpload").ToString
|
||||
Dim Ruta As String = Session("FileFolder").ToString
|
||||
|
||||
Dim Minimo, Maximo, Total As Double
|
||||
'If txtMinimo.Text.ToDouble > 0 Then Minimo = txtMinimo.Text.ToDouble Else Minimo = -1
|
||||
@@ -1612,11 +1612,11 @@ Partial Class Contratos_Default
|
||||
|
||||
For Ciclo As Integer = 1 To CiclosComercialesEnMeses
|
||||
Dim FechaRef As DateTime = FechaI.AddMonths(PeriodoMeses * Ciclo)
|
||||
Dim lastDayOfMonth = DateTime.DaysInMonth(FechaRef.Year, FechaRef.Month)
|
||||
Dim lastDayOfMonth As Integer = DateTime.DaysInMonth(FechaRef.Year, FechaRef.Month)
|
||||
|
||||
Dim DiaMes As Integer = If(lastDayOfMonth < DdlDiaFact.SelectedValue.ToEntero(), lastDayOfMonth, DdlDiaFact.SelectedValue.ToEntero())
|
||||
|
||||
Dim FechaFact = New DateTime(FechaRef.Year, FechaRef.Month, DiaMes)
|
||||
Dim FechaFact As Date = New DateTime(FechaRef.Year, FechaRef.Month, DiaMes)
|
||||
FechaFact = If(FechaFact > FechaF, FechaF, FechaFact)
|
||||
|
||||
If Not ObjContratos.CicloComercialAdd(CveContrato, -1, DdlCliente.SelectedValue.ToEntero, False, -1, 1, UsuarioActual.CveEmpresa, FechaFact) Then TieneError = True : Exit For
|
||||
@@ -1644,7 +1644,7 @@ Partial Class Contratos_Default
|
||||
|
||||
Dim DiaAnterior As Integer = 0
|
||||
|
||||
For CicloDias = 1 To CiclosPorMes
|
||||
For CicloDias As Integer = 1 To CiclosPorMes
|
||||
Dim DiaMes As Integer = 0
|
||||
|
||||
If CicloDias = 1 Then
|
||||
@@ -1994,8 +1994,8 @@ Partial Class Contratos_Default
|
||||
UpGV.Update()
|
||||
End Sub
|
||||
Protected Sub BtnAutorizar_Click(sender As Object, e As EventArgs) Handles BtnAutorizar.Click
|
||||
Dim pinterno = TmpDT.SUM("Total", "CveTipoPresupuesto=1").ToString.ToDouble
|
||||
Dim pventas = TmpDT.SUM("Total", "CveTipoPresupuesto=2").ToString.ToDouble
|
||||
Dim pinterno As Double = TmpDT.SUM("Total", "CveTipoPresupuesto=1").ToString.ToDouble
|
||||
Dim pventas As Double = TmpDT.SUM("Total", "CveTipoPresupuesto=2").ToString.ToDouble
|
||||
If (pinterno < pventas) Then
|
||||
Dim objContrato As New ClsContratos
|
||||
|
||||
@@ -2038,7 +2038,7 @@ Partial Class Contratos_Default
|
||||
Row("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
||||
TmpDT.Rows.Add(Row)
|
||||
TmpDT.AcceptChanges()
|
||||
Dim TotalRow = Row("Total").ToString.ToDouble
|
||||
Dim TotalRow As Double = Row("Total").ToString.ToDouble
|
||||
|
||||
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
||||
|
||||
@@ -2086,7 +2086,7 @@ Partial Class Contratos_Default
|
||||
Dim CveContratoDetalle As Integer = gvr.DataKey("CveContratoDetalle").ToString.ToEntero
|
||||
Dim objContrato As New ClsContratos
|
||||
If objContrato.UpdateContratosDetalleEstimacion(CveContratoDetalle, IIf(btn.Checked, 1, 0).ToString.ToEntero) Then
|
||||
Dim row = TmpDT.Select(String.Format("CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||
Dim row As DataRow = TmpDT.Select(String.Format("CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||
row("PermitirEstimacion") = IIf(btn.Checked, 1, 0).ToString.ToEntero
|
||||
Alert("Se ha permitido estimar", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
@@ -2103,7 +2103,7 @@ Partial Class Contratos_Default
|
||||
Dim CveContratoDetalle As Integer = gvr.DataKey("CveContratoDetalle").ToString.ToEntero
|
||||
Dim objContrato As New ClsContratos
|
||||
If objContrato.UpdateContratosDetalleAvance(CveContratoDetalle, IIf(btn.Checked, 1, 0).ToString.ToEntero) Then
|
||||
Dim row = TmpDT.Select(String.Format("CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||
Dim row As DataRow = TmpDT.Select(String.Format("CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||
row("PermitirAvance") = IIf(btn.Checked, 1, 0).ToString.ToEntero
|
||||
|
||||
|
||||
@@ -2169,7 +2169,7 @@ Partial Class Contratos_Default
|
||||
OCInterna = Gv.Rows(e.RowIndex).FCTextBox("TxtOCInternaEdit").Text.ToString
|
||||
LimitarCantidad = Gv.Rows(e.RowIndex).FCCheckBox("ChkLimitarCantidad").Checked
|
||||
Observaciones = Gv.Rows(e.RowIndex).FCTextBox("TxtObservacion").Text.ToString
|
||||
Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||
Dim row As DataRow = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||
Dim LimitarCantidadValidator As Boolean = row("LimitarCantidad").ToString = "True"
|
||||
If row("CantidadContratada").ToString.ToEntero <> Cantidad OrElse row("PU").ToString.ToEntero <> PU OrElse CveUM <> row("CveUM").ToString.ToEntero OrElse row("NoIdentificacion").ToString <> NoIdentificacion OrElse row("OCInterna").ToString <> OCInterna OrElse LimitarCantidadValidator <> LimitarCantidad Then
|
||||
|
||||
@@ -2284,7 +2284,7 @@ Partial Class Contratos_Default
|
||||
End If
|
||||
Row("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
||||
TmpDT.Rows.Add(Row)
|
||||
Dim TotalRow = Row("Total").ToString.ToDouble
|
||||
Dim TotalRow As Double = Row("Total").ToString.ToDouble
|
||||
|
||||
CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1"))
|
||||
|
||||
@@ -2354,7 +2354,7 @@ Partial Class Contratos_Default
|
||||
NoIdentificacion = GvInsumos.Rows(e.RowIndex).FCTextBox("TxtNoIdentificacion").Text.ToString
|
||||
LimitarCantidad = GvInsumos.Rows(e.RowIndex).FCCheckBox("ChkLimitarCantidad").Checked
|
||||
|
||||
Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||
Dim row As DataRow = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||
|
||||
If row("Cantidad").ToString.ToEntero <> Cantidad OrElse row("PU").ToString.ToEntero <> PU OrElse CveUM <> row("CveUM").ToString.ToEntero OrElse row("NoIdentificacion").ToString <> NoIdentificacion OrElse (row("LimitarCantidad").ToString = "True") <> LimitarCantidad Then
|
||||
|
||||
@@ -2453,7 +2453,7 @@ Partial Class Contratos_Default
|
||||
End If
|
||||
Row("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
||||
TmpDT.Rows.Add(Row)
|
||||
Dim TotalRow = Row("Total").ToString.ToDouble
|
||||
Dim TotalRow As Double = Row("Total").ToString.ToDouble
|
||||
GvInt.DataSource = TmpDT.FiltraParametros("CveTipoPresupuesto=1")
|
||||
GvInt.DataBind()
|
||||
|
||||
@@ -2494,10 +2494,10 @@ Partial Class Contratos_Default
|
||||
CveUM = GvInt.Rows(e.RowIndex).FCDropDownList("DdlUMEdit").SelectedValue.ToEntero
|
||||
|
||||
'NoIdentificacion = GvInt.Rows(e.RowIndex).FCDropDownList("NoIdentificacion").ToString
|
||||
Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||
Dim c1 = row("Cantidad").ToString.ToEntero
|
||||
Dim p1 = row("PU").ToString.ToEntero
|
||||
Dim cvum1 = row("CveUM").ToString.ToEntero
|
||||
Dim row As DataRow = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||
Dim c1 As Integer = row("Cantidad").ToString.ToEntero
|
||||
Dim p1 As Decimal = row("PU").ToString.ToDecimal
|
||||
Dim cvum1 As Integer = row("CveUM").ToString.ToEntero
|
||||
If c1 <> Cantidad OrElse p1 <> PU OrElse CveUM <> cvum1 Then
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
@@ -2573,7 +2573,7 @@ Partial Class Contratos_Default
|
||||
TabReporteAvance.Visible = True
|
||||
lbImprimirAvance.Visible = True
|
||||
|
||||
Dim Modalidad = IfNull(Request("Tipo"), 1, 2)
|
||||
Dim Modalidad As Integer = IfNull(Request("Tipo"), 1, 2).ToString.ToEntero
|
||||
|
||||
If Modalidad.ToString.ToEntero = 2 Then
|
||||
Tab.ActiveTabIndex = 2
|
||||
@@ -2613,19 +2613,19 @@ Partial Class Contratos_Default
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
Dim Liga1 = $"{e.Row.DBCampo("CveClasificacion").ToEntero}|{e.Row.DBCampo("Clasificacion")}|{e.Row.DBCampo("CvePS").ToEntero}|{e.Row.DBCampo("CodigoPS")}|1"
|
||||
Dim Liga1 As String = $"{e.Row.DBCampo("CveClasificacion").ToEntero}|{e.Row.DBCampo("Clasificacion")}|{e.Row.DBCampo("CvePS").ToEntero}|{e.Row.DBCampo("CodigoPS")}|1"
|
||||
e.Row.FCLinkButton("LBAvanceCantidad").CommandArgument = Liga1
|
||||
e.Row.FCLinkButton("LBAvanceImporte").CommandArgument = Liga1
|
||||
|
||||
Dim Liga2 = $"{e.Row.DBCampo("CveClasificacion").ToEntero}|{e.Row.DBCampo("Clasificacion")}|{e.Row.DBCampo("CvePS").ToEntero}|{e.Row.DBCampo("CodigoPS")}|2"
|
||||
Dim Liga2 As String = $"{e.Row.DBCampo("CveClasificacion").ToEntero}|{e.Row.DBCampo("Clasificacion")}|{e.Row.DBCampo("CvePS").ToEntero}|{e.Row.DBCampo("CodigoPS")}|2"
|
||||
e.Row.FCLinkButton("LBAvanceXFacturarCantidad").CommandArgument = Liga2
|
||||
e.Row.FCLinkButton("LBAvanceXFacturarImporte").CommandArgument = Liga2
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub MuestaModalVentasAvance(sender As Object, e As EventArgs)
|
||||
Dim Btn = CType(sender, LinkButton)
|
||||
Dim Parametros = Btn.CommandArgument.Split("|"c)
|
||||
Dim Btn As LinkButton = CType(sender, LinkButton)
|
||||
Dim Parametros As String() = Btn.CommandArgument.Split("|"c)
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
|
||||
@@ -2987,7 +2987,7 @@ Partial Class Contratos_Default
|
||||
e.Row.Cells(4).Text = ""
|
||||
e.Row.Cells(5).Text = ""
|
||||
|
||||
Dim Texto = $"Pedido: <b><a href='/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta")}' target='_blank'>{e.Row.DBCampo("SerieFolio")}</a></b> | "
|
||||
Dim Texto As String = $"Pedido: <b><a href='/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta")}' target='_blank'>{e.Row.DBCampo("SerieFolio")}</a></b> | "
|
||||
Texto += If(e.Row.DBCampo("CveMovimiento").ToString = "", " SIN MOVIMIENTO DE ALMACÉN", $"Folio Almacén: <b><a href ='/Inventarios/EntradasSalidas.aspx?CveMovimiento={e.Row.DBCampo("CveMovimiento")}' target='_blank'>{e.Row.DBCampo("Folio")}</a></b>")
|
||||
|
||||
e.Row.Cells(0).ColumnSpan = 2
|
||||
@@ -3014,7 +3014,7 @@ Partial Class Contratos_Default
|
||||
e.Row.Cells(4).Text = ""
|
||||
e.Row.Cells(5).Text = ""
|
||||
|
||||
Dim Texto = $"Devolución: <b><a href='/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta")}' target='_blank'>{e.Row.DBCampo("SerieFolio")}</a></b> | "
|
||||
Dim Texto As String = $"Devolución: <b><a href='/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta")}' target='_blank'>{e.Row.DBCampo("SerieFolio")}</a></b> | "
|
||||
Texto += If(e.Row.DBCampo("CveMovimiento").ToString = "", " SIN MOVIMIENTO DE ALMACÉN", $"Folio Almacén: <b><a href ='/Inventarios/EntradasSalidas.aspx?CveMovimiento={e.Row.DBCampo("CveMovimiento")}' target='_blank'>{e.Row.DBCampo("Folio")}</a></b>")
|
||||
|
||||
e.Row.Cells(0).ColumnSpan = 2
|
||||
@@ -3102,7 +3102,7 @@ Partial Class Contratos_Default
|
||||
|
||||
LBLAFValorActivo.Text = DT.SUM("ValorImporte", "CveMovimientoDetalle > 0").ToString("###,###,###.00")
|
||||
|
||||
Dim Total = DT.SUM("Cantidad", "CveMovimientoDetalle > 0 AND TipoDocto = 'Ped'") - DT.SUM("Cantidad", "TipoDocto = 'DPe'")
|
||||
Dim Total As Decimal = DT.SUM("Cantidad", "CveMovimientoDetalle > 0 AND TipoDocto = 'Ped'") - DT.SUM("Cantidad", "TipoDocto = 'DPe'")
|
||||
|
||||
LBLAFTotal.Text = DT.SUM("Cantidad", "CveMovimientoDetalle > 0").ToString()
|
||||
UPAFResumen.Update()
|
||||
@@ -3119,7 +3119,7 @@ Partial Class Contratos_Default
|
||||
e.Row.Cells(4).Text = ""
|
||||
e.Row.Cells(5).Text = ""
|
||||
|
||||
Dim Texto = $"{If(e.Row.DBCampo("TipoDocto") = "Ped", "Pedido", "Devolución") }: <b><a href='/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta")}' target='_blank'>{e.Row.DBCampo("SerieFolio")}</a></b> | "
|
||||
Dim Texto As String = $"{If(e.Row.DBCampo("TipoDocto") = "Ped", "Pedido", "Devolución") }: <b><a href='/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta")}' target='_blank'>{e.Row.DBCampo("SerieFolio")}</a></b> | "
|
||||
Texto += If(e.Row.DBCampo("CveMovimiento").ToString = "", " SIN MOVIMIENTO DE ALMACÉN", $"Folio Almacén: <b><a href ='/Inventarios/EntradasSalidas.aspx?CveMovimiento={e.Row.DBCampo("CveMovimiento")}' target='_blank'>{e.Row.DBCampo("Folio")}</a></b>")
|
||||
|
||||
|
||||
@@ -3169,7 +3169,7 @@ Partial Class Contratos_Default
|
||||
|
||||
For Each GRow As GridViewRow In GvDatosAlmacen.Rows
|
||||
Dim CveMovimientoDetalle As Integer = GRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||
Dim ChkEsInterno = GRow.FCCheckBox("ChkEsInterno")
|
||||
Dim ChkEsInterno As CheckBox = GRow.FCCheckBox("ChkEsInterno")
|
||||
|
||||
If CveMovimientoDetalle > 0 And ChkEsInterno.Checked And DdlEsInterno.SelectedValue.ToEntero > 0 Then
|
||||
Dim EsInterno As Boolean
|
||||
@@ -3221,7 +3221,7 @@ Partial Class Contratos_Default
|
||||
Protected Sub BtnDevolucionAlmacen_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjVentas As New ClsVentas
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
For Each Dr As DataRow In DtMovimientos.FiltraParametros("CveVenta IS NOT NULL AND CveMovimiento IS NOT NULL AND EsDevolucionVenta = 0", "", {"CveVenta"}).Rows
|
||||
If Not ObjVentas.UpdateVentasDevolucionAlmacen(1, Dr("CveVenta").ToString.ToEntero) Then
|
||||
@@ -3229,7 +3229,6 @@ Partial Class Contratos_Default
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
ObjVentas.Commit()
|
||||
Alert("La solicitud de devolución se guardo correctamente.", TipoMensaje.MsgInformacion)
|
||||
@@ -3241,9 +3240,6 @@ Partial Class Contratos_Default
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Public Sub CargaDatosEncabezado()
|
||||
|
||||
TablaUtilidad.Visible = True
|
||||
@@ -3466,7 +3462,7 @@ Partial Class Contratos_Default
|
||||
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
||||
Dim dt As New DataTable
|
||||
dt = ReadExcelFile(Ruta + FileName, True)
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorArchivo As Boolean = False
|
||||
|
||||
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||
'Try
|
||||
@@ -3602,7 +3598,7 @@ Partial Class Contratos_Default
|
||||
guardarBitacora(msj)
|
||||
dr("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
||||
TmpDT.Rows.Add(dr)
|
||||
Dim TotalRow = dr("Total").ToString.ToDouble
|
||||
Dim TotalRow As Double = dr("Total").ToString.ToDouble
|
||||
|
||||
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
||||
LbTotalGeneral.Text = (LbTotalGeneral.Text.ToDouble + TotalRow).ToString.FormatoNumero
|
||||
@@ -3708,7 +3704,7 @@ Partial Class Contratos_Default
|
||||
End Sub
|
||||
Private Sub CargaDiasMes(Optional NumMaxDias As Integer = 31)
|
||||
DdlDiaFact.Items.Clear()
|
||||
For i = 1 To NumMaxDias
|
||||
For i As Integer = 1 To NumMaxDias
|
||||
DdlDiaFact.Items.Add(New ListItem(i.ToString(), i.ToString()))
|
||||
Next
|
||||
End Sub
|
||||
@@ -4019,7 +4015,7 @@ Partial Class Contratos_Default
|
||||
End Sub
|
||||
|
||||
Private Function GetDatosTagsDocumentos() As List(Of TagsDocumentos)
|
||||
Dim ListaTagsDocumentost = New List(Of TagsDocumentos)
|
||||
Dim ListaTagsDocumentost As New List(Of TagsDocumentos)
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If CveContrato <> -1 Then
|
||||
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
@@ -4072,7 +4068,7 @@ Partial Class Contratos_Default
|
||||
|
||||
#Region "CREAR A PARTIR DE"
|
||||
Private Sub BtnAgregarContratoHijo_Click(sender As Object, e As EventArgs) Handles BtnAgregarContratoHijo.Click
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
@@ -4131,9 +4127,8 @@ Partial Class Contratos_Default
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function AgregarDetalleHijo(CveContratoHijo As Integer, ByRef ObjContratos As ClsContratos) As Boolean
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim Cantidades As Double
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
@@ -4600,8 +4595,8 @@ Partial Class Contratos_Default
|
||||
|
||||
If Plantilla.Contains("{MES}") Then
|
||||
Dim fecha As DateTime = NowADS()
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{MES}", nombreMes)
|
||||
End If
|
||||
@@ -4616,16 +4611,16 @@ Partial Class Contratos_Default
|
||||
|
||||
If Plantilla.Contains("{MESANTERIOR}") Then
|
||||
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{MESANTERIOR}", nombreMes)
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{INICIOMESANTERIOR}") Then
|
||||
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Dim mesAnterior As String = String.Format("01 {0} {1}", nombreMes, fecha.Year)
|
||||
|
||||
@@ -4634,10 +4629,10 @@ Partial Class Contratos_Default
|
||||
|
||||
If Plantilla.Contains("{FINMESANTERIOR}") Then
|
||||
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Dim LastDayOfMonth = DateTime.DaysInMonth(fecha.Year, fecha.Month)
|
||||
Dim LastDayOfMonth As Integer = DateTime.DaysInMonth(fecha.Year, fecha.Month)
|
||||
|
||||
Dim mesAnterior As String = String.Format("{0} {1} {2}", LastDayOfMonth, nombreMes, fecha.Year)
|
||||
|
||||
@@ -4655,8 +4650,8 @@ Partial Class Contratos_Default
|
||||
|
||||
If Plantilla.Contains("{MES}") Then
|
||||
Dim fecha As DateTime = NowADS()
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{MES}", nombreMes)
|
||||
End If
|
||||
@@ -4671,16 +4666,16 @@ Partial Class Contratos_Default
|
||||
|
||||
If Plantilla.Contains("{MESANTERIOR}") Then
|
||||
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{MESANTERIOR}", nombreMes)
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{INICIOMESANTERIOR}") Then
|
||||
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Dim mesAnterior As String = String.Format("01 {0} {1}", nombreMes, fecha.Year)
|
||||
|
||||
@@ -4689,10 +4684,10 @@ Partial Class Contratos_Default
|
||||
|
||||
If Plantilla.Contains("{FINMESANTERIOR}") Then
|
||||
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Dim LastDayOfMonth = DateTime.DaysInMonth(fecha.Year, fecha.Month)
|
||||
Dim LastDayOfMonth As Integer = DateTime.DaysInMonth(fecha.Year, fecha.Month)
|
||||
|
||||
Dim mesAnterior As String = String.Format("{0} {1} {2}", LastDayOfMonth, nombreMes, fecha.Year)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user