Cita:
Empezado por Jarogo08
pues a mi usando el objeto me deja asignarle un campo string:
Código:
CType(objectoFactEmitida.RegistroFactura(x).Item, RegistroFacturacionAltaType).FechaHoraHusoGenRegistro = Row.Item("FechaHoraHusoGenRegistro")
CType(objectoFactEmitida.RegistroFactura(x).Item, RegistroFacturacionAltaType).TipoHuella = TipoHuellaType.Item01
CType(objectoFactEmitida.RegistroFactura(x).Item, RegistroFacturacionAltaType).Huella = Row.Item("HuellaVerifactu")
donde "FechaHoraHusoGenRegistro" es un varchar(50) en la tabla del SQL Server
|
Supongo que en tu caso, la propiedad FechaHoraHusoGenRegistro del objeto RegistroFacturacionAltaType es de tipo string y lo permite.
En nuestro caso es DateTime y no puedo hacer esa asignación directa sin convertir.
Al importar el WSDL dentro del fichero reference.cs genera el campo así:
Código:
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=25)]
public System.DateTime FechaHoraHusoGenRegistro {
get {
return this.fechaHoraHusoGenRegistroField;
}
set {
this.fechaHoraHusoGenRegistroField = value;
this.RaisePropertyChanged("FechaHoraHusoGenRegistro");
}
}
y dentro del fichero SuministroInformacion.xsd también indica dateTime
Código:
<element name="FechaHoraHusoGenRegistro" type="dateTime" />
Gracias igualmente