<telerik:RadScheduler AllowInsert="false" GroupBy="Doctor, Facility" HoursPanelTimeFormat="hh:mm tt" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
OnAppointmentCreated="RadScheduler1_AppointmentCreated" runat="server" ID="RadScheduler1"
Skin="Office2007" Height="545px" CustomAttributeNames="StatusId" Width="690px"
ShowFooter="false" SelectedDate="2010-03-18" DayStartTime="07:00:00" DayEndTime="21:00:00"
FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" EnableDescriptionField="true"
ShowNavigationPane="false" OnAppointmentDelete="RadScheduler1_AppointmentDelete"
DataSubjectField="Subject" DataStartField="FromTime" DataEndField="ToTime" ShowAllDayRow="false"
AllowEdit="false" DataKeyField="AppointmentId" DataDescriptionField="Description" OnTimeSlotContextMenuItemClicked="RadScheduler1_TimeSlotContextMenuItemClicked"
AllowDelete="false" OnAppointmentContextMenuItemClicked="RadScheduler1_AppointmentContextMenuItemClicked"
OnNavigationCommand="RadScheduler1_NavigationCommand" OnTimeSlotCreated="RadScheduler1_TimeSlotCreated">
<AppointmentContextMenuSettings EnableDefault="false" />
<TimelineView UserSelectable="false" />
<ResourceTypes>
<telerik:ResourceType KeyField="FacilityID" Name="Facility" TextField="FacilityName" ForeignKeyField="FacId" />
</ResourceTypes>
<ResourceTypes>
<telerik:ResourceType KeyField="DoctorID" Name="Doctor" TextField="DoctorName" ForeignKeyField="DocId" />
</ResourceTypes>
<AppointmentTemplate>
<%
# Eval("Subject")%>
<br />
<asp:Label runat="server" ID="Teacher" />
<br />
<asp:Label runat="server" ID="Students" />
</AppointmentTemplate>
<AppointmentContextMenus>
<telerik:RadSchedulerContextMenu runat="server" DataTextField="Status" DataValueField="StatusId"
ID="SchedulerAppointmentContextMenu" AppendDataBoundItems="true">
<Items>
<telerik:RadMenuItem Text="Copy" Value="Copy" />
<telerik:RadMenuItem IsSeparator="True" />
<telerik:RadMenuItem Text="Edit" Value="Edit" />
<telerik:RadMenuItem IsSeparator="True" />
</Items>
</telerik:RadSchedulerContextMenu>
</AppointmentContextMenus>
<TimeSlotContextMenus>
<telerik:RadSchedulerContextMenu runat="server" ID="SchedulerTimeSlotContextMenu">
<Items>
<telerik:RadMenuItem Text="New Appointment" Value="New" />
<telerik:RadMenuItem IsSeparator="true" />
<telerik:RadMenuItem Text="Paste" Value="Paste" />
</Items>
</telerik:RadSchedulerContextMenu>
</TimeSlotContextMenus>
<TimeSlotContextMenuSettings EnableDefault="False" />
</telerik:RadScheduler>
protected
void btnRefresh_OnClick(Object sender , EventArgs e)
{
DataSet ds = new DataSet();
Hashtable HashIn = new Hashtable();
DAL.
DAL dl = new DAL.DAL(DAL.DAL.DBType.SqlServer, sConString);
String strProvider = "";
foreach (RadListBoxItem currentItem in RadLstDoctor.Items)
{
if (currentItem.Checked == true)
{
String value = currentItem.Value;
strProvider = strProvider +
"<Table1><c1>" + value + "</c1></Table1>";
}
}
if(strProvider=="")
{
Alert.ShowAjaxMsg("Please select one provider.",Page);
return;
}
HashIn.Add(
"@inyHospitalLocationId", Session["HospitalLocationID"]);
HashIn.Add(
"@intFacilityId",ddlFacility.SelectedValue);
HashIn.Add(
"@xmlDoctorIds", strProvider); // "<Table1><c1>1</c1></Table1>"); // ddlDoctor.SelectedValue);
HashIn.Add(
"@chrForDate", CalApp.SelectedDate.Date.ToString("yyyy/MM/dd"));
ds = dl.FillDataSet(
CommandType.StoredProcedure, "uspGetDoctorAppDetailstest", HashIn);
if (ds.Tables[0].Rows.Count > 0)
{
RadScheduler1.SelectedDate = CalApp.SelectedDate;
RadScheduler1.DayStartTime =
TimeSpan.Parse(ds.Tables[0].Rows[0].ItemArray[0].ToString());
RadScheduler1.DayEndTime =
TimeSpan.Parse(ds.Tables[0].Rows[0].ItemArray[1].ToString());
RadScheduler1.MinutesPerRow =
int.Parse(ds.Tables[0].Rows[0].ItemArray[2].ToString());
RadScheduler1.TimeLabelRowSpan = 60 /
int.Parse(ds.Tables[0].Rows[0].ItemArray[2].ToString());
RadScheduler1.DataKeyField =
"AppointmentId";
RadScheduler1.DataStartField =
"FromTime";
RadScheduler1.DataEndField =
"ToTime";
RadScheduler1.DataSubjectField =
"Subject";
RadScheduler1.GroupBy =
"Doctor, Facility";
RadScheduler1.ResourceTypes[0].DataSource = ds.Tables[3];
RadScheduler1.ResourceTypes[1].DataSource = ds.Tables[2];
RadScheduler1.DataSource = ds.Tables[1];
RadScheduler1.DataBind();
lblFacility.Text = ddlFacility.SelectedItem.Text;
}
else
{
Alert.ShowAjaxMsg("There is no time define in selected provider and facility.", Page);
}
}
<telerik:RadScheduler runat="server" ID="RadScheduler1" StartEditingInAdvancedForm="false"
Width="100%" DayStartTime="08:00:00" DayEndTime="18:00:00" Height="565px" WeekHeaderDateFormat="dd-MMM-yyyy"TimelineView-HeaderDateFormat="dd-MMM-yyyy"
DisplayDeleteConfirmation="False" AllowDelete="false"
DataKeyField="ID" DataSubjectField="Title" DataStartField="StartDate" DataEndField="EndDate"
FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" SelectedView="MonthView"
onappointmentdatabound="RadScheduler1_AppointmentDataBound">
</telerik:RadScheduler>
System.Data.OleDb.
OleDbDataAdapter dbAdapter = new System.Data.OleDb.OleDbDataAdapter(SelectCommand, dbCon);
DataSet ds = new DataSet();
dbAdapter.Fill(ds);
RadScheduler1.DataSource = ds.Tables[0]
//RadScheduler1.GroupBy = "title";
//RadScheduler1.GroupingDirection = GroupingDirection.Vertical;
RadScheduler1.DataBind();
var
multiPage = $find(
'<%= InquiryDetailNotesMultiPage.ClientID %>'
);
var
tabStrip = $find(
"<%= InquiryDetailNotesTabStrip.ClientID %>"
);
var
baseId =
"<%= CombinedNotesArea.ClientID %>"
.replace(
"CombinedNotesArea"
,
""
);
var
baseGridId =
"<%= InquiryDetailCombinedGrid.ClientID %>"
.replace(
"InquiryDetailCombinedGrid"
,
""
);
var
views = multiPage.get_pageViews();
var
tabs = tabStrip.get_tabs();
var
additionalInformationHtml =
""
;
for
(
var
i = 0; i< views.get_count(); i++) {
var
view = views.getPageView(i);
var
tab = tabs.getTab(i);
var
grid = $find(baseGridId +
"InquiryDetail"
+ tab.get_text().replace(
" "
,
""
) +
"Grid"
);
if
(grid) {
additionalInformationHtml =
"Additional Information - "
;
additionalInformationHtml += tab.get_text();
additionalInformationHtml += view.get_element().children[0].outerHTML;
}
document.getElementById(baseId + tab.get_text().replace(
" "
,
""
) +
"NotesArea"
).innerHTML = additionalInformationHtml;
}
function
CallPrint() {
var
content = $get(
"<%= PrintableArea.ClientID %>"
).innerHTML;
var
styleSheet =
'<%= Telerik.Web.SkinRegistrar.GetWebResourceUrl(Page, InquiryDetailOnlineActivityGrid.GetType(), String.Format("Telerik.Web.UI.Skins.{0}.Grid.{0}.css", InquiryDetailOnlineActivityGrid.Skin)) %>'
;
var
baseStyleSheet =
'<%= Telerik.Web.SkinRegistrar.GetWebResourceUrl(Page, InquiryDetailOnlineActivityGrid.GetType(), "Telerik.Web.UI.Skins.Grid.css") %>'
;
//remove any script elements
content = content.replace( /<script .*?>(.|\n)*?<\/script>/gi ,
""
);
var
printIframe = $get(
"ifmcontentstoprint"
);
var
printDocument = printIframe.contentWindow.document;
printDocument.designMode =
"on"
;
printDocument.open();
printDocument.write(
"<html><head><link href = '"
+ styleSheet +
"' rel='stylesheet' type='text/css'><link href = '"
+ baseStyleSheet +
"' rel='stylesheet' type='text/css'></head><body>"
+ content +
"</body></html>"
);
printDocument.close();
try
{
if
(document.all) {
printDocument.execCommand(
"Print"
,
null
,
false
);
}
else
{
printIframe.contentWindow.print();
}
}
catch
(ex) {
alert(
"error printing"
);
}
}