The resource id is available in "resource" variable in TimeRangeSelectedJavaScript:
<DayPilot:DayPilotScheduler
TimeRangeSelectedHandling="JavaScript"
TimeRangeSelectedJavaScript="console.log(start + ' ' + end + ' ' + resource);"
In the server-side event handler (TimeRangeSelected) it's available as e.Resource:
protected void DayPilotScheduler1_TimeRangeSelected(object sender, DayPilot.Web.Ui.Events.TimeRangeSelectedEventArgs e)
{
DateTime start = e.Start;
DateTime end = e.End;
string resource = e.Resource;
}