// Export data in XML format public void ExportXmlDocument(ref cXMLDocument XmlDoc, bool HasParent, ref SqlDataReader Recordset, int StartRec, int StopRec, string ExportPageType) { if (Recordset == null || XmlDoc == null) return; if (!HasParent) XmlDoc.AddRoot(TableVar); // Move to first record int RecCnt = StartRec - 1; for (int i = 1; i <= StartRec - 1; i++) Recordset.Read(); while (Recordset.Read() && RecCnt < StopRec) { RecCnt++; if (RecCnt >= StartRec) { int RowCnt = RecCnt - StartRec + 1; LoadListRowValues(ref Recordset); // Render row RowType = EW_ROWTYPE_VIEW; // Render view ResetAttrs(); RenderListRow(); if (HasParent) XmlDoc.AddRow(TableVar, ""); else XmlDoc.AddRow("", ""); if (ExportPageType == "view") { XmlDoc.AddField("IdRegistroPeaton", IdRegistroPeaton.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("IdTipoDocumento", IdTipoDocumento.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Documento", Documento.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Nombre", Nombre.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Apellidos", Apellidos.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("IdArea", IdArea.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("IdPersona", IdPersona.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("FechaIngreso", FechaIngreso.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("FechaSalida", FechaSalida.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Observacion", Observacion.ExportValue(Export, ExportOriginalValue)); } else { XmlDoc.AddField("IdRegistroPeaton", IdRegistroPeaton.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("IdTipoDocumento", IdTipoDocumento.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Documento", Documento.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Nombre", Nombre.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Apellidos", Apellidos.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("IdArea", IdArea.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("IdPersona", IdPersona.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("FechaIngreso", FechaIngreso.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("FechaSalida", FechaSalida.ExportValue(Export, ExportOriginalValue)); } } } }
// Export data in XML format public void ExportXmlDocument(ref cXMLDocument XmlDoc, bool HasParent, ref SqlDataReader Recordset, int StartRec, int StopRec, string ExportPageType) { if (Recordset == null || XmlDoc == null) return; if (!HasParent) XmlDoc.AddRoot(TableVar); // Move to first record int RecCnt = StartRec - 1; for (int i = 1; i <= StartRec - 1; i++) Recordset.Read(); while (Recordset.Read() && RecCnt < StopRec) { RecCnt++; if (RecCnt >= StartRec) { int RowCnt = RecCnt - StartRec + 1; LoadListRowValues(ref Recordset); // Render row RowType = EW_ROWTYPE_VIEW; // Render view ResetAttrs(); RenderListRow(); if (HasParent) XmlDoc.AddRow(TableVar, ""); else XmlDoc.AddRow("", ""); if (ExportPageType == "view") { XmlDoc.AddField("IdTipoVehiculo", IdTipoVehiculo.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("TipoVehiculo", TipoVehiculo.ExportValue(Export, ExportOriginalValue)); } else { XmlDoc.AddField("IdTipoVehiculo", IdTipoVehiculo.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("TipoVehiculo", TipoVehiculo.ExportValue(Export, ExportOriginalValue)); } } } }
// Export data in XML format public void ExportXmlDocument(ref cXMLDocument XmlDoc, bool HasParent, ref SqlDataReader Recordset, int StartRec, int StopRec, string ExportPageType) { if (Recordset == null || XmlDoc == null) return; if (!HasParent) XmlDoc.AddRoot(TableVar); // Move to first record int RecCnt = StartRec - 1; for (int i = 1; i <= StartRec - 1; i++) Recordset.Read(); while (Recordset.Read() && RecCnt < StopRec) { RecCnt++; if (RecCnt >= StartRec) { int RowCnt = RecCnt - StartRec + 1; LoadListRowValues(ref Recordset); // Render row RowType = EW_ROWTYPE_VIEW; // Render view ResetAttrs(); RenderListRow(); if (HasParent) XmlDoc.AddRow(TableVar, ""); else XmlDoc.AddRow("", ""); if (ExportPageType == "view") { XmlDoc.AddField("IdVehiculoAutorizado", IdVehiculoAutorizado.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("IdTipoVehiculo", IdTipoVehiculo.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Placa", Placa.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Autorizado", Autorizado.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("IdPersona", IdPersona.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("PicoyPlaca", PicoyPlaca.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Lunes", Lunes.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Martes", Martes.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Miercoles", Miercoles.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Jueves", Jueves.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Viernes", Viernes.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Sabado", Sabado.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Domingo", Domingo.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Marca", Marca.ExportValue(Export, ExportOriginalValue)); } else { XmlDoc.AddField("IdVehiculoAutorizado", IdVehiculoAutorizado.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("IdTipoVehiculo", IdTipoVehiculo.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Placa", Placa.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Autorizado", Autorizado.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("IdPersona", IdPersona.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("PicoyPlaca", PicoyPlaca.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Lunes", Lunes.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Martes", Martes.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Miercoles", Miercoles.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Jueves", Jueves.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Viernes", Viernes.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Sabado", Sabado.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Domingo", Domingo.ExportValue(Export, ExportOriginalValue)); XmlDoc.AddField("Marca", Marca.ExportValue(Export, ExportOriginalValue)); } } } }