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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<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>--%>
                <div class="row">
                    <div class="card">
                        <div class="row">
                            <div class="col-md-4">
                                <div class="card-header">
                                    <div class="row bspace form-group">
                                        <div class="col-md-6">
                                            <h4 class="card-title">Date</h4>
                                        </div>
                                        <div class="col-md-6">
                                            <a href="PatientVIsit.aspx" class="btn icon btn-primary" title="Add Patient"><i data-feather="user-plus"></i></a>
                                        </div>
                                    </div>
                                </div>
                                <div class="card-content">
                                    <div class="row bspace form-group">
                                        <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>
                <section class="section">
                    <div class="row" id="table-hover-row">

                        <div class="col-12">
                            <div class="card">
                                <div class="card-header">
                                    <h4 class="card-title">
                                        <asp:Label ID="lblAppointmentMsg" runat="server"></asp:Label></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>
                                                    <th>Department Name</th>
                                                    <th>Doctor Name</th>
                                                    <th>Status</th>
                                                    <th>Action</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:Label ID="lblVisitID" Text='<%#Eval("VisitID") %>' runat="server" Visible="false"></asp:Label>
                                                                <%#Eval("DepartmentName") %>
                                                                <asp:Label ID="lblTableName" runat="server" Text='<%#Eval("TableName") %>' Visible="false"></asp:Label>
                                                            </td>
                                                            <td><%#Eval("DocName") %></td>
                                                            <td><%# Eval("VisitStatus") %></td>
                                                            <td>
                                                                <asp:Label ID="lblPatientID" runat="server" Visible="false" Text='<%#Eval("PatientID") %>'></asp:Label>
                                                                <asp:DropDownList ID="ddlButtons" runat="server" CssClass="btn btn-primary bspace" AutoPostBack="true" OnSelectedIndexChanged="ddlButtons_SelectedIndexChanged">
                                                                    <asp:ListItem Text="Select" Value="0"></asp:ListItem>
                                                                    <asp:ListItem Text="Profile" Value="1"></asp:ListItem>
                                                                    <asp:ListItem Text="Visit" Value="2"></asp:ListItem>
                                                                    <asp:ListItem Text="Report" Value="3"></asp:ListItem>
                                                                    <asp:ListItem Text="Cancel" Value="4"></asp:ListItem>
                                                                </asp:DropDownList>
                                                                <asp:Label ID="lblDepartment" Text='<%#Eval("Department") %>' runat="server" Visible="false"></asp:Label>
                                                            </td>
                                                            <%-- <td>
                                                                <div class="btn-group" role="group">
                                                                    <button id="btnGroupDrop1" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
                                                                        Dropdown
                                                                    </button>
                                                                    <ul class="dropdown-menu" aria-labelledby="btnGroupDrop1">
                                                                        <li><a class="dropdown-item" href="#">Dropdown link</a></li>
                                                                        <li><a class="dropdown-item" href="#">Dropdown link</a></li>
                                                                    </ul>
                                                                </div>
                                                            </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">
                                        <asp:Label ID="lblFollowUpMsg" runat="server"></asp:Label></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>Contact No</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("WANo") %></td>
                                                            <td><%# Eval("VisitDates") %></td>
                                                            <td>
                                                                <%#Eval("DepartmentName") %></td>
                                                            <td><%#Eval("DocName") %></td>
                                                            <td>
                                                                <asp:Button ID="btnBookAppointment" runat="server" CommandArgument='<%#Eval("FollowUpID") %>' Text="Book Appointment" 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>

