
10/12/2012, 10:22
|
 | | | Fecha de Ingreso: mayo-2012
Mensajes: 21
Antigüedad: 12 años, 8 meses Puntos: 0 | |
Respuesta: aque se debe este tipo de error en convercion en las fechas Error de servi Cita:
Iniciado por Aquaventus Cada vez que coloques código usa las etiquetas Highlight para visualizarlo de una mejor manera y en forma ordenada :
Código vb:
Ver originalDim _DATAOPER As CasdixData.Data.iDataOper = InterfazRDN.CreaDataOper("", "", AppConst.ConexionSYS) Dim _auto As New ThorIntegSDK.Autos.Autos _auto.DataOper = _dataoper _auto.DataOperGPS = _DATAOPERGPS _auto.AU_ID_AUTO = ddl_Autos.SelectedValue _auto.Load_Autos() ' Dim _DATAOPERGPS As CasdixData.Data.iDataOper = InterfazRDN.CreaDataOper("", "", AppConst.ConexionGPS) Dim _eventcatch As New ThorIntegSDK.GPS.EventCatch _eventcatch.DataOper = _DATAOPERGPS _eventcatch.IMEI = _auto.DT_EQUIPOSGPS.Rows(0)(ThorIntegSDK.GPS.Equip osGPS.EquiposGPSCons.IMEI) Dim _dt As Data.DataTable = _auto.List_Eventos_X_Fecha_X_IMEI(String.Format("{ 0} {1}", CDate(fc_Ini.Fecha).ToString("dd/MM/yyyy"), uc_horaini.HORAS), String.Format("{0} {1}", CDate(fc_Final.Fecha).ToString("dd/MM/yyyy"), uc_HORAFIN.HORAS), _auto.DT_EQUIPOSGPS.Rows(0)(ThorIntegSDK.GPS.Equip osGPS.EquiposGPSCons.IMEI)) Dim _dt_eventos As DataTable = _auto.List_Eventos_X_Fecha_X_IMEI(String.Format("{ 0} {1}", CDate(fc_Ini.Fecha).ToString("dd/MM/yyyy"), uc_horaini.HORAS), String.Format("{0} {1}", CDate(fc_Final.Fecha).ToString("dd/MM/yyyy"), uc_HORAFIN.HORAS), _auto.DT_EQUIPOSGPS.Rows(0)(ThorIntegSDK.GPS.Equip osGPS.EquiposGPSCons.IMEI)) Dim _dt_aux As DataTable = ConvierteCoord(_dt_eventos) Dim _i As Integer = 0 If _dt_aux.Rows.Count > 0 Then Dim _salto As Integer = _dt_aux.Rows.Count \ 9 Origen = String.Format("{0}, {1}", _dt_aux.Rows(0)("latitud"), _dt_aux.Rows(0)("longitud")) If _dt_aux.Rows.Count >= 9 Then For _h As Integer = 8 To 1 Step -1 WayPoints(_i) = "{" & String.Format(" location: ""{0},{1}"" ", _dt_aux.Rows(_h * _salto)("latitud"), _dt_aux.Rows(_h * _salto)("LONGITUD")) & "}" _i += 1 Next Else For _h As Integer = 1 To _dt_aux.Rows.Count - 1 WayPoints(_i) = "{" & String.Format(" location: ""{0},{1}"" ", _dt_aux.Rows(_h * _salto)("latitud"), _dt_aux.Rows(_h * _salto)("LONGITUD")) & "}" _i += 1 Next End If End If Destino = String.Format("{0},{1}", _dt_aux.Rows(_dt_aux.Rows.Count - 1)("LATITUD"), _dt_aux.Rows(_dt_aux.Rows.Count - 1)("LONGITUD")) ReDim Preserve WayPoints(_i) WayPointsString = String.Join(",", WayPoints) Dim _obj As New GoogleStructure _obj.Origen = Origen _obj.Destino = Destino _obj.Puntos = WayPointsString _obj.RutaSugGoogle = cb_Ruta_Sug.Checked MisArgumentos.UserState = _obj Dim _j As Integer = 0 ReDim Preserve PuntosAltArr(_dt_aux.Rows.Count - 1) ReDim Preserve PuntosLinea(_dt_aux.Rows.Count - 1) Dim _IMG As Integer = "0" For Each _dr As Data.DataRow In _dt_aux.Rows If _j = 1 Then _IMG = 1 ElseIf _j = _dt_aux.Rows.Count - 1 Then _IMG = 2 End If PuntosAltArr(_j) = "['<table ><tr><td>" & _dr("Fecha reporte GPS") & "</td></tr><tr><td>" & _dr("evento") & "</td></tr></table>'," & String.Format("{0},{1},{2}", _dr("latitud"), _dr("longitud"), _j + 1) & "," & _IMG & "]" PuntosLinea(_j) = String.Format("new google.maps.LatLng({0},{1})", _dr("latitud"), _dr("longitud")) _j += 1 Next _obj.PuntosAlt = String.Join(",", PuntosAltArr) _obj.PuntosLinea = String.Join(",", PuntosLinea) MisArgumentos.TablaHistorico = _dt_aux Return _dt_aux ' Return (_dt_eventos)
ok no sabia |