namespace Tripolis
{
using System;
using System.CodeDom.Compiler;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
[Serializable, ToolboxItem(true), DesignerCategory("code"), XmlSchemaProvider("GetTypedDataSetSchema"), HelpKeyword("vs.data.DataSet"), GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), XmlRoot("StoredProcedureCreation")]
public class DataSet2 : DataSet
{
private SchemaSerializationMode Campo1;
private DataTable4 Campo2;
private DataTable3 Campo3;
private DataTable2 Campo4;
[DebuggerNonUserCode]
public DataSet2()
{
this.Campo1 = SchemaSerializationMode.IncludeSchema;
base.BeginInit();
this.Clase6();
CollectionChangeEventHandler handler = new CollectionChangeEventHandler(this.Clase2);
base.Tables.CollectionChanged += handler;
base.Relations.CollectionChanged += handler;
base.EndInit();
}
protected DataSet2(SerializationInfo _paramentro1, StreamingContext Parametro2) : base(parametro1, paramentro2, false)
{
this.Campo1 = SchemaSerializationMode.IncludeSchema;
:
:
:
}
[Serializable, XmlSchemaProvider("GetTypedTableSchema"), DefaultMember("Item"), GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class DataTable1 : DataTable, IEnumerable
{
private DataSet2.MulticastDelegate8 Campo1;
private DataSet2.MulticastDelegate8 Campo2;
private DataSet2.MulticastDelegate8 Campo3;
private DataSet2.MulticastDelegate8 Campo4;
:
:
:
}
[Serializable, XmlSchemaProvider("GetTypedTableSchema"), DefaultMember("Item"), GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class DataTable2 : DataTable, IEnumerable
{
private DataSet2.MulticastDelegate6 Campo1;
private DataSet2.MulticastDelegate6 Campo2;
private DataSet2.MulticastDelegate6 Campo3;
private DataSet2.MulticastDelegate6 Campo4;
:
:
:
}
[Serializable, XmlSchemaProvider("GetTypedTableSchema"), DefaultMember("Item"), GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class DataTable3 : DataTable, IEnumerable
{
private DataSet2.MulticastDelegate7 Campo1;
private DataSet2.MulticastDelegate7 Campo2;
private DataSet2.MulticastDelegate7 Campo3;
private DataSet2.MulticastDelegate7 Campo4;
:
:
:
}
[Serializable, DefaultMember("Item"), XmlSchemaProvider("GetTypedTableSchema"), GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class DataTable4 : DataTable, IEnumerable
{
private DataSet2.MulticastDelegate8 Campo1;
private DataSet2.MulticastDelegate8 Campo2;
private DataSet2.MulticastDelegate8 Campo3;
private DataSet2.MulticastDelegate8 Campo4;
:
:
:
}
}
}
ooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOooooooooooooo
I can not compile this code because the compiler sends me the following error:
Error: 'Tripolis.DataSet1.DataTable1' does not implemented interface member 'System.Collections.IEnumerable.GetEnumerator ()'
C: \ Course \ Tripolis \ DataSet1.cs
This error is generated by the compiler in the 4 following lines:
DataTable1 public class: DataTable, IEnumerable
DataTable2 public class: DataTable, IEnumerable
DataTable3 public class: DataTable, IEnumerable
DataTable4 public class: DataTable, IEnumerable
I hope someone help me correct this error. I'm learning and do not understand the issue of "colletions."
Thank you
ipadillar
Translated into Spanish:
No logro la compilación de este código porque que el compilado me envía el siguiente error:
Error:'Tripolis.DataSet1.DataTable1' does not implement interface member 'System.Collections.IEnumerable.GetEnumerator()'
C:\Curso\Tripolis\DataSet1.cs
Este error lo genera el compilador en las 4 líneas siguientes:
public class DataTable1 : DataTable, IEnumerable
public class DataTable2 : DataTable, IEnumerable
public class DataTable3 : DataTable, IEnumerable
public class DataTable4 : DataTable, IEnumerable
Espero que alguien me ayude a corregir este error. Estoy aprendiendo y no entiendo bien el tema de las "colletions".
Gracias
ipadillar
Loading
VulpesPosted Aug 26, 2011, 3:46 PM
[Serializable, XmlSchemaProvider("GetTypedTableSchema"), DefaultMember("Item"), GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class DataTable1 : DataTable, IEnumerable
{
private DataSet2.MulticastDelegate8 Campo1;
private DataSet2.MulticastDelegate8 Campo2;
private DataSet2.MulticastDelegate8 Campo3;
private DataSet2.MulticastDelegate8 Campo4;
IEnumerator IEnumerable.GetEnumerator()
{
return null;
}
:
:
:
}
You'll also need to include it in DataTable2, DataTable3 and DataTable4 to avoid similar compiler errors.
Isidro PadillaPosted Aug 27, 2011, 3:26 AM
your answer is correct and I have solved the problem.
Thanks for your patience with a novice like me.
ipadillar
Translate into Spanish:
Vulpes,
tu respuesta es correcta y me ha resuelto el problema.
Gracias por tu paciencia con un novato como yo.
ipadillar
Isidro PadillaPosted Aug 26, 2011, 2:36 PM
I do not understand how to do the implementation you told me. I use the Datarrow in the following classes:
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class DataRow1 : DataRow
{
private DataSet1.DataTable1 Campo1;
[DebuggerNonUserCode]
internal DataRow1(DataRowBuilder _paramentro1) : base(_parametro1)
{
this.Campo1 = (DataSet1.DataTable1) base.Table;
}
[DebuggerNonUserCode]
public void Class1()
{
base[this.Campo1.Clase28()] = Convert.DBNull;
}
[DebuggerNonUserCode]
public bool Clase10()
{
return base.IsNull(this.Campo1.Clase32());
}
:
:
:
}
But not where I have to implement:
IEnumerator IEnumerable.GetEnumerator ()
{
return null;
}
If you kindly explain me where and how I appreciate it.
The module where these classes are too large to paste here. If you need something you ask me, please.
thanks
ipadillar
oooooooooooooooOOOOOOOOOOOOOOOoooooooooooooooo
Translated into Spanish:
Hola Vulpes:
No entiendo bien la manera que hacer la implementación que tu me comentas. Yo empleo el Datarrow en las clasees siguientes:
[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class DataRow1 : DataRow
{
private DataSet1.DataTable1 Campo1
[DebuggerNonUserCode]
internal DataRow1(DataRowBuilder _paramentro1) : base(_paramentro1)
{
this.Campo1 = (DataSet1.DataTable1) base.Table;
}
[DebuggerNonUserCode]
public void Class1()
{
base[this.Campo1.Clase28()] = Convert.DBNull;
}
[DebuggerNonUserCode]
public bool Clase10()
{
return base.IsNull(this.Campo1.Clase32());
}
:
:
:
}
Pero no se donde tengo que implementar:
IEnumerator IEnumerable.GetEnumerator()
{
return null;
}
Si eres tan amable de explicarme donde y como te lo agradeceré.
El módulo donde se encuentran estas clases es muy grande para pegarlo aquí. Si necesitas algo más me lo pides.
Gracias
ipadillar
VulpesPosted Aug 26, 2011, 1:54 PM
However, if your DataTable classes need to implement IEnumerable for some reason, then you can place the following minimal implementation of GetEnumerator() into each one for now so that they will compile:
IEnumerator IEnumerable.GetEnumerator()
{
return null;
}