Hi,
I fill my daypilotscheduler with a datateble just like on the demo. But when I add more that one reservation for a room it works ok showing every reservation next to another, but generates new rows as many reservations has the room.
this is my code:
private DataTable dbGetEvents(DateTime start, int days)
{
SqlDataAdapter da = new SqlDataAdapter("SELECT DISTINCT A.ID_EVENTO AS ReservationId,B.RUT_NUM,B.NOMBRES+' '+B.APELLIDOS AS ReservationName,C.ID_CAMA AS RoomId, A.ID_ESTADOCAMA AS ReservationStatus,A.FECHA as ReservationStart,A.FECHA_FIN AS ReservationEnd, B.INTERVENSION AS INTERVENSION FROM HOS_GESTIONCAMA A, HOS_PACIENTE B,CAMA C,HOS_ESTADOCAMAS D WHERE A.RUT_NUM = B.RUT_NUM AND A.ID_CAMA = C.ID_CAMA AND A.ID_ESTADOCAMA = D.ID_ESTADOCAMA AND NOT (([FECHA_FIN] <= @start)OR ([FECHA] >= @end))", ConfigurationManager.ConnectionStrings["cnsicbo"].ConnectionString);
da.SelectCommand.Parameters.AddWithValue("start", start);
da.SelectCommand.Parameters.AddWithValue("end", start.AddDays(days));
DataTable dt = new DataTable();
da.Fill(dt);
}
I guess is something wrong on the query.
please help