I
Islam Elkhayat
here is my class
public class AppointmentRowCollection : Appointment
{
public Appointment[] GetRowsCollection(out int rows)
{
int i = 0;
dataset= new AppointmentDS();
dataset= SelectAppointment();
DataRowCollection drcollection = dataset.Appointments.Rows;
rows = drcollection.Count;
foreach (DataRow row in drcollection)
{
AppointmentID = int.Parse(row["AppointmentID"].ToString());
AppointmentDate= Convert.ToDateTime(row["AppointmentDate"]);
TimeFrom= row["TimeFrom"].ToString();
TimeTo= row["TimeTo"].ToString();
return new Appointment();
}
return null;
}
}
AppointmentID,AppAppointmentDate....... is a public property From
Appointment Class
How ca i return Appointment[] array form my foreach loop??
public class AppointmentRowCollection : Appointment
{
public Appointment[] GetRowsCollection(out int rows)
{
int i = 0;
dataset= new AppointmentDS();
dataset= SelectAppointment();
DataRowCollection drcollection = dataset.Appointments.Rows;
rows = drcollection.Count;
foreach (DataRow row in drcollection)
{
AppointmentID = int.Parse(row["AppointmentID"].ToString());
AppointmentDate= Convert.ToDateTime(row["AppointmentDate"]);
TimeFrom= row["TimeFrom"].ToString();
TimeTo= row["TimeTo"].ToString();
return new Appointment();
}
return null;
}
}
AppointmentID,AppAppointmentDate....... is a public property From
Appointment Class
How ca i return Appointment[] array form my foreach loop??