<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register TagPrefix="radG" Namespace="Telerik.WebControls" Assembly="RadGrid.Net2" %>
<%@ Register TagPrefix="radCln" Namespace="Telerik.WebControls" Assembly="RadCalendar.Net2" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div>
            <telerik:RadCodeBlock ID="cb" runat="server">

                <script language="javascript" type="text/javascript">  
	        window.CalendarChanged = function(calendarInstance, args)  
 	        {  
 	            if (args.RenderDay.IsSelected)   
 	                return false;   
 	        }  
 	        window.GetTodaysDateSCH = function(){/*GetDateStamp(<%=this.txtDate.ClientID %>);*/}  
                </script>

            </telerik:RadCodeBlock>
            <telerik:RadAjaxLoadingPanel ID="alp" runat="server" IsSticky="true" MinDisplayTime="0"
                HorizontalAlign="Center">
                <asp:Image ID="Image2" runat="server" alt="loading..." ImageUrl="~/Images/Loading2.gif" />
            </telerik:RadAjaxLoadingPanel>
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="alp" EnableAJAX="true"
                EnableHistory="true" EnablePageHeadUpdate="true">
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="title" runat="server" Text="Schedule Search: " />
                            <radCln:RadDatePicker ID="txtDate" runat="server" SharedCalendarID="RadCalendar1"
                                onkeypress="GetTodaysDateSCH();" MinDate="1/1/2000">
                                <DateInput Title="" ToolTip="Press 'd' for current date" AutoPostBack="true" UseEmbeddedScripts="false"
                                    DateFormat="MM/dd/yyyy">
                                </DateInput>
                            </radCln:RadDatePicker>
                            <radCln:RadCalendar ID="RadCalendar1" runat="server" Skin="WebBlue" UseEmbeddedScripts="false">
                            </radCln:RadCalendar>
                            <asp:Button ID="Button1" runat="server" Text="Refresh" />
                        </td>
                    </tr>
                </table>
                <radG:RadGrid ID="rg" runat="server" Style="width: 100%;" AllowSorting="True" GridLines="None"
                    OnNeedDataSource="rg_NeedDataSource" AutoGenerateColumns="False" >
                    <MasterTableView GridLines="None">
                        <Columns>
                            <radG:GridBoundColumn DataField="ID" ReadOnly="True" UniqueName="ID" Visible="False">
                            </radG:GridBoundColumn>
                            <radG:GridBoundColumn DataField="PatientEncounter_ID" ReadOnly="True" UniqueName="PatientEncounter_ID"
                                Visible="False">
                            </radG:GridBoundColumn>
                            <radG:GridBoundColumn HeaderText="Time" UniqueName="Time" DataField="Time">
                            </radG:GridBoundColumn>
                            <radG:GridTemplateColumn HeaderText="Patient" UniqueName="patient" Groupable="False">
                                <ItemTemplate>
                                    <asp:HyperLink ID="hlp" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.Patient") %>'></asp:HyperLink>
                                </ItemTemplate>
                            </radG:GridTemplateColumn>
                            <radG:GridBoundColumn HeaderText="Account Number" UniqueName="AccountNumber" DataField="AccountNumber">
                            </radG:GridBoundColumn>
                            <radG:GridBoundColumn HeaderText="Procedure" UniqueName="ProcedureName" DataField="ProcedureName">
                            </radG:GridBoundColumn>
                            <radG:GridTemplateColumn UniqueName="TemplateColumnAdditionalProcedure" Groupable="False">
                                <ItemTemplate>
                                    <asp:HyperLink ID="hl" runat="server" ImageUrl="~/Images/MedicalChart.gif"></asp:HyperLink>
                                </ItemTemplate>
                            </radG:GridTemplateColumn>
                        </Columns>
                    </MasterTableView>
                    <AlternatingItemStyle BackColor="#ECECEC" />
                </radG:RadGrid>
            </telerik:RadAjaxPanel>
        </div>
    </form>
</body>
</html>
