<%@ page title="Dashboard" language="C#" masterpagefile="~/DoctorMasterPage.master" autoeventwireup="true" inherits="Dashboard, App_Web_fzfkhksa" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="PagePanel" runat="server" ChildrenAsTriggers="true">
        <ContentTemplate>
            <div class="main-content container-fluid">
                <%--  <div class="page-title">
                    <h3>Dashboard</h3>
                </div>--%>
                <section class="section">
                    <div class="row">
                        <div class="card">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="card-header">
                                        <h4 class="card-title">Date</h4>
                                    </div>
                                    <div class="card-content">
                                        <div class="row">
                                            <asp:Calendar ID="Calender1" runat="server" CssClass="dat" OnSelectionChanged="Calender_SelectionChanged"></asp:Calendar>
                                        </div>
                                      
                                    </div>

                                </div>
                                <div class="col-md-4">
                                    <div class="card-header">
                                        <h4 class="card-title">Search Patient</h4>
                                    </div>
                                    <div class="card-content">
                                        <div class="col-md-10">
                                            <asp:TextBox ID="txtPatientName" runat="server" placeholder="Patient Name" CssClass="form-select" list="PatientList" AutoPostBack="true" OnTextChanged="txtPatientName_TextChanged" />
                                            <datalist id="PatientList">
                                                <asp:Repeater ID="repeatList" runat="server">
                                                    <ItemTemplate>
                                                        <option value='<%# Eval("PatientName") %> - <%# Eval("OwnerName") %>' itemid='<%# Eval("PatientID") %>'></option>
                                                    </ItemTemplate>
                                                </asp:Repeater>
                                            </datalist>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="card-header">
                                        <h4 class="card-title">Search Doctor</h4>
                                    </div>
                                    <div class="card-content">
                                        <div class="row">
                                            <asp:TextBox ID="txtDoctor" runat="server" placeholder="Doctor Name" CssClass="form-select" list="DoctorList" AutoPostBack="true" OnTextChanged="txtDoctor_TextChanged" />
                                            <datalist id="DoctorList">
                                                <asp:Repeater ID="DoctorRepeater" runat="server">
                                                    <ItemTemplate>
                                                        <option value='<%# Eval("DocName") %>' itemid='<%# Eval("DoctorID") %>'></option>
                                                    </ItemTemplate>
                                                </asp:Repeater>
                                            </datalist>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="card">
                                <div class="card-header">
                                    <h4 class="card-title">Today's Appointment</h4>
                                </div>
                                <div class="card-content">
                                    <div class="table-responsive">
                                        <table class="table table-striped" id="table1">
                                            <thead>
                                                <tr>
                                                    <%--  <th>VisitID</th>--%>
                                                    <th>VisitDate</th>
                                                    <th>VisitTime</th>
                                                    <th>PatientName</th>
                                                    <th>OwnerName</th>
                                                    <th>Complaints</th>
                                                    <%-- <td>Department Name</td>--%>
                                                    <th>Consult</th>
                                                    <th>Profile</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <asp:Repeater ID="RepeaterPatientVisit" runat="server">
                                                    <ItemTemplate>
                                                        <tr>
                                                            <td><%# Eval("VisitDate") %></td>
                                                            <td><%#Eval("VisitTime") %></td>
                                                            <td class="text-bold-500"><%# Eval("PatientName") %></td>
                                                            <td><%# Eval("OwnerName") %></td>
                                                            <td><%# Eval("Complaints") %></td>
                                                            <td>
                                                                <asp:Button CssClass="btn btn-primary" runat="server" ID="View" Text="View" OnClick="View_SelectedIndexChanged" CommandArgument='<%#Eval("Department") %>'></asp:Button>
                                                                <asp:Label ID="lblVisitID" Text='<%#Eval("VisitID") %>' runat="server" Visible="false"></asp:Label>

                                                                <asp:Label ID="lblDepartment" Text='<%#Eval("DepartmentName") %>' runat="server" Visible="false"></asp:Label>
                                                            </td>
                                                            <td>   <asp:Button CssClass="btn btn-primary" runat="server" ID="btnProfile" Text="Profile" OnClick="btnProfile_Click" CommandArgument='<%#Eval("PatientID") %>'></asp:Button></td>
                                                        </tr>
                                                    </ItemTemplate>
                                                </asp:Repeater>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-12">
                            <div class="card">
                                <div class="card-header">
                                    <h4 class="card-title">Today's Followup</h4>
                                </div>
                                <div class="card-content">
                                    <div class="table-responsive">
                                        <table class="table table-striped" id="table2">
                                            <thead>
                                                <tr>
                                                    <%--    <th>VisitID</th>--%>
                                                    <th>FollowUpDate</th>
                                                    <th>PatientName</th>
                                                    <th>OwnerName</th>
                                                    <th>VisitDate</th>
                                                    <th>Department Name</th>
                                                    <th>Doctor Name</th>
                                                    <th>Action</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <asp:Repeater ID="RepeaterFollowUP" runat="server">
                                                    <ItemTemplate>
                                                        <tr>
                                                            <td><%# Eval("FollowUpDates") %></td>
                                                            <td class="text-bold-500"><%# Eval("PatientName") %></td>
                                                            <td><%# Eval("OwnerName") %></td>
                                                            <td><%# Eval("VisitDates") %></td>
                                                            <td>
                                                                <%#Eval("DepartmentName") %></td>
                                                            <td><%#Eval("DocName") %></td>
                                                            <td>
                                                                <asp:Button ID="btnBookAppointment" runat="server" CommandArgument='<%#Eval("FollowUpID") %>' Text="View" CssClass="btn btn-primary" OnClick="btnBookAppointment_Click" /></td>
                                                        </tr>
                                                    </ItemTemplate>
                                                </asp:Repeater>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row form-group">
                        <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
                        <asp:Label ID="lblID" runat="server" Visible="false"></asp:Label>
                        <asp:Label ID="lblPatientID" runat="server" Visible="false"></asp:Label>
                        <asp:Label ID="lblUserID" runat="server" Visible="false"></asp:Label>
                        <asp:Label ID="lblMsg" runat="server" ForeColor="Green"></asp:Label>
                    </div>
                </section>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>

