<%@ page title="" language="C#" masterpagefile="~/DoctorMasterPage.master" autoeventwireup="true" inherits="GynaecForm, 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>Gynacology Form</h3>
                </div>--%>               
                <section class="section">
                    <div class="divider">
                        <div class="divider-text">Gynacology Details</div>
                    </div>
                    <div class="row form-group">
                        <div class="col-md-2">
                            <label class="label">Visit Date</label>
                            <asp:TextBox ID="txtVisitDate" runat="server" CssClass="form-control" TextMode="Date" placeholder="Visit Date" required AutoComplete="off" ReadOnly="True"></asp:TextBox>
                        </div>
                        <div class="col-md-4">
                            <label class="label">Owner Name</label>
                            <asp:TextBox ID="txtOwnerName" runat="server" CssClass="form-control" AutoPostBack="true" OnTextChanged="txtOwnerName_TextChanged" placeholder="Owner Name" required AutoComplete="off" ReadOnly="True"></asp:TextBox>
                            <cc1:AutoCompleteExtender ID="txtOwnerName_AutoCompleteExtender" runat="server" BehaviorID="txtOwnerName_AutoCompleteExtender" CompletionListCssClass="completionList" CompletionListHighlightedItemCssClass="itemHighlighted" CompletionListItemCssClass="listItem" DelimiterCharacters="" ServicePath="AutoComplete.asmx" ServiceMethod="GetOwnerName" TargetControlID="txtOwnerName">
                            </cc1:AutoCompleteExtender>
                            <asp:Label ID="lblOwnerID" runat="server" Visible="false"></asp:Label>
                        </div>
                        <div class="col-md-4">
                            <label class="label">Patient Name</label>
                            <asp:TextBox ID="txtPatientName" runat="server" CssClass="form-control" AutoPostBack="true" OnTextChanged="txtPatientName_TextChanged" placeholder="Patient Name" required AutoComplete="off" ReadOnly="True"></asp:TextBox>
                            <cc1:AutoCompleteExtender ID="txtPatientName_AutoCompleteExtender" runat="server" BehaviorID="txtPatientName_AutoCompleteExtender" CompletionListCssClass="completionList" CompletionListHighlightedItemCssClass="itemHighlighted" CompletionListItemCssClass="listItem" DelimiterCharacters="" ServicePath="AutoComplete.asmx" ServiceMethod="GetPatientName" TargetControlID="txtPatientName">
                            </cc1:AutoCompleteExtender>
                        </div>

                        <div class="col-md-2">
                            <label class="label">Gender</label>
                            <asp:DropDownList ID="ddlGender" runat="server" CssClass="form-select" Enabled="False">
                                <asp:ListItem Text="Male"></asp:ListItem>
                                <asp:ListItem Text="Female"></asp:ListItem>
                                <asp:ListItem Text="Neutered Male"></asp:ListItem>
                                <asp:ListItem Text="Neutered Female"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                    </div>
                    <div class="row bspace">
                        <div class="col-md-3">
                            <label class="label">Species</label>
                            <asp:DropDownList ID="ddlSpeciesType" runat="server" CssClass="form-select" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="ddlSpeciesType_SelectedIndexChanged" Enabled="False">
                                <asp:ListItem Selected="True" Value="0" Text="Select"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Breed</label>
                            <asp:DropDownList ID="ddlBreed" runat="server" CssClass="form-select" AppendDataBoundItems="true" Enabled="False">
                                <asp:ListItem Selected="True" Value="0" Text="Select"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="col-md-1">
                            <label class="label">Age</label>
                            <asp:TextBox ID="txtAge" runat="server" CssClass="form-control" placeholder="Age" Enabled="False"></asp:TextBox>
                        </div>
                        <div class="col-md-1">
                            <label class="label">Weight</label>
                            <asp:TextBox ID="txtWeight" runat="server" CssClass="form-control" placeholder="Weight"></asp:TextBox>
                        </div>
                        <div class="col-md-4">
                            <label class="label">Allergies</label>
                            <asp:TextBox ID="txtAllergies" runat="server" TextMode="MultiLine" CssClass="form-control" placeholder="Allergies"></asp:TextBox>
                        </div>

                    </div>
                    <div class="row bspace">
                        <div class="col-md-4">
                            <label class="label">Animal Type</label>
                            <asp:DropDownList ID="ddlAnimalType" runat="server" CssClass="form-select" AutoPostBack="true" OnSelectedIndexChanged="ddlAnimalType_SelectedIndexChanged" Enabled="False">
                                <asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>
                                <asp:ListItem Text="Large" Value="1"></asp:ListItem>
                                <asp:ListItem Text="Small" Value="2"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="col-md-4">
                            <label class="label">Primary Complaint </label>
                            <asp:TextBox ID="txtComplaint" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Complaint" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-4">
                            <label class="label">Last Heat</label>
                            <asp:TextBox ID="txtLastHeat" runat="server" CssClass="form-control" placeholder="Last Heat Date" AutoComplete="off"></asp:TextBox>
                        </div>
                    </div>
                    <div class="row bspace" id="Small" runat="server" visible="false">
                        <div class="row bspace">
                            <div class="col-md-4">
                                <label class="label">Mating History</label>
                                <asp:TextBox ID="txtMatingHist" runat="server" CssClass="form-control" placeholder="Mating History" AutoComplete="off"></asp:TextBox>
                            </div>
                            <div class="col-md-4">
                                <label class="label">Apetite</label>
                                <asp:DropDownList ID="ddlApetite" runat="server" CssClass="form-select">
                                    <asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>
                                    <asp:ListItem Text="Normal" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="Reduced" Value="2"></asp:ListItem>
                                    <asp:ListItem Text="Absent" Value="3"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="col-md-4">
                                <label class="label">Any Other</label>
                                <asp:TextBox ID="txtOtherMating" runat="server" CssClass="form-control" placeholder="Other Details" AutoComplete="off"></asp:TextBox>
                            </div>
                        </div>
                        <div class="row bspace">
                            <div class="col-md-2">
                                <label class="label">Prev Preg Count</label>
                                <asp:DropDownList ID="ddlPregPrevCount" runat="server" CssClass="form-select">
                                    <asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>
                                    <asp:ListItem Text="1" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="2" Value="2"></asp:ListItem>
                                    <asp:ListItem Text="3" Value="3"></asp:ListItem>
                                    <asp:ListItem Text="4" Value="4"></asp:ListItem>
                                    <asp:ListItem Text="5" Value="5"></asp:ListItem>
                                    <asp:ListItem Text="6" Value="6"></asp:ListItem>
                                    <asp:ListItem Text="7" Value="7"></asp:ListItem>
                                    <asp:ListItem Text="8" Value="8"></asp:ListItem>
                                    <asp:ListItem Text="9" Value="9"></asp:ListItem>
                                    <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="col-md-2">
                                <label class="label">Prev Preg Hist</label>
                                <asp:DropDownList ID="ddlPrevPreg" runat="server" CssClass="form-select">
                                    <asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>
                                    <asp:ListItem Text="Normal" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="Had Complications" Value="2"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="col-md-2">
                                <label class="label">Duration Since Last Parturition</label>
                                <asp:TextBox ID="txtPartDuration" runat="server" CssClass="form-control" placeholder="Duration Since Last Parturition" AutoComplete="off"></asp:TextBox>
                            </div>
                            <div class="col-md-2">
                                <label class="label">Interval of Heat Cycle</label>
                                <asp:TextBox ID="txtHeatCycleInterval" runat="server" CssClass="form-control" placeholder="Interval of Heat Cycle" AutoComplete="off"></asp:TextBox>
                            </div>
                            <div class="col-md-4">
                                <label class="label">Other Sympotms</label>
                                <asp:CheckBoxList ID="ddlOtherSympotms" runat="server" CssClass="form-group">
                                    <asp:ListItem Text="Licking Genitals" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="Swelling in Genitals" Value="2"></asp:ListItem>
                                    <asp:ListItem Text="Abnormal Growth at Genitals" Value="3"></asp:ListItem>
                                    <asp:ListItem Text="Digging" Value="4"></asp:ListItem>
                                    <asp:ListItem Text="Seclusion" Value="5"></asp:ListItem>
                                    <asp:ListItem Text="Mammery Gland Enlargment" Value="6"></asp:ListItem>
                                </asp:CheckBoxList>
                            </div>
                        </div>
                    </div>
                    <div class="row bspace" id="Large" runat="server" visible="false">
                        <div class="row form-group bspace">
                            <div class="col-md-4">
                                <label class="label">Current Status</label>
                                <asp:DropDownList ID="ddlCurStatus" runat="server" CssClass="form-select">
                                    <asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>
                                    <asp:ListItem Text="Pregnant" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="Lactating" Value="2"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="col-md-4">
                                <label class="label">Heat Cycle Status</label>
                                <asp:DropDownList ID="ddlHeatCycleStatus" runat="server" CssClass="form-select">
                                    <asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>
                                    <asp:ListItem Text="Regular" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="Not Regular" Value="2"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="col-md-4">
                                <label class="label">Other Details</label>
                                <asp:TextBox ID="txtOtherDetails" runat="server" CssClass="form-control" placeholder="Heat Details" AutoComplete="off"></asp:TextBox>
                            </div>
                        </div>
                        <div class="row form-group bspace">
                            <div class="col-md-3">
                                <label class="label">Milk Yeild</label>
                                <asp:TextBox ID="txtMilkYeild" runat="server" CssClass="form-control" placeholder="Milk Yeild" AutoComplete="off"></asp:TextBox>
                            </div>
                            <div class="col-md-3">
                                <label class="label">Stage of w/Preg</label>
                                <asp:TextBox ID="txtStage" runat="server" CssClass="form-control" placeholder="Stage of Lact/Preg" AutoComplete="off"></asp:TextBox>
                            </div>
                            <div class="col-md-3">
                                <label class="label">No. Of Pregnancy</label>
                                <asp:TextBox ID="txtNoPreg" runat="server" CssClass="form-control" placeholder="No. Of Pregnancy" AutoComplete="off"></asp:TextBox>
                            </div>
                            <div class="col-md-3">
                                <label class="label">Last Calving</label>
                                <asp:DropDownList ID="ddlLastCalving" runat="server" CssClass="form-select">
                                    <asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>
                                    <asp:ListItem Text="Normal" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="Not Normal" Value="2"></asp:ListItem>
                                </asp:DropDownList>
                            </div>

                        </div>
                        <div class="row bspace">
                            <div class="col-md-6">
                                <label class="label">History Of AI </label>
                                <asp:TextBox ID="txtHistAI" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="History Of AI " AutoComplete="off"></asp:TextBox>
                            </div>
                            <div class="col-md-6">
                                <label class="label">Other Calving Details</label>
                                <asp:TextBox ID="txtCalvingDetails" runat="server" TextMode="MultiLine" CssClass="form-control" placeholder="Other Calving Details" AutoComplete="off"></asp:TextBox>
                            </div>
                        </div>
                    </div>
                    <div class="row bspace">
                        <div class="col-md-3">
                            <label class="label">Other Symptoms</label>
                            <asp:TextBox ID="txtOtherSymp" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Other Symptoms" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Miscellaneous</label>
                            <asp:TextBox ID="txtMisc" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Miscellaneous" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Treatment </label>
                            <asp:TextBox ID="txtTreatment" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Treatment" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Advice </label>
                            <asp:TextBox ID="txtAdvice" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Advice" AutoComplete="off"></asp:TextBox>
                        </div>
                    </div>
                    <div class="row bspace">
                        <div class="col-md-4">
                            <label class="label">Assesment </label>
                            <asp:TextBox ID="txtAssesment" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Assesment" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-4">
                            <label class="label">Tentative Diag </label>
                            <asp:TextBox ID="txtTentativeDiag" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Tentative Diag" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-4">
                            <label class="label">Follow Up Date </label>
                            <asp:TextBox ID="txtFollowUpDate" runat="server" CssClass="form-control" TextMode="Date" placeholder="Follow Up Date" AutoComplete="off"></asp:TextBox>
                        </div>
                    </div>
                    <div class="row bspace form-group" style="display: none">
                        <div class="col-md-6">
                            <label class="label">Charges</label>
                            <asp:TextBox ID="txtCharges" runat="server" CssClass="form-control" placeholder="Charges" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-6">
                            <label class="label">Total Bill</label>
                            <asp:TextBox ID="txtTotalBill" runat="server" CssClass="form-control" placeholder="Total Bill" AutoComplete="off"></asp:TextBox>
                        </div>
                    </div>
                     <div class="row bspace form-group">
                        <asp:GridView ID="GridPatientImages" runat="server" AutoGenerateColumns="False" CssClass="table table-responsive">
                            <Columns>
                                <asp:BoundField DataField="SrNo" HeaderText="SrNo" />
                                <asp:BoundField DataField="ImageID" HeaderText="ImageID" SortExpression="ImageID" HeaderStyle-CssClass="hideGridColumn" ItemStyle-CssClass="hideGridColumn" />
                                <asp:BoundField DataField="PatientID" HeaderText="PatientID" SortExpression="PatientID" HeaderStyle-CssClass="hideGridColumn" ItemStyle-CssClass="hideGridColumn" />
                                <asp:BoundField DataField="ImageName" HeaderText="ImageName" SortExpression="ImageName" />
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lnkPath" runat="server"
                                            OnClick="lnkPath_Click" CommandArgument='<%# Eval("ImgPath") %>' Text="Open"></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>                               
                            </Columns>
                        </asp:GridView>
                    </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="lblVisitID" 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>
                        <asp:Label ID="lblDepartment" runat="server" Visible="false"></asp:Label>
                        <asp:Label ID="lblDepartmentID" runat="server" Visible="false"></asp:Label>
                        <asp:Label ID="lblVisitStatus" runat="server" Visible="false"></asp:Label>
                        <asp:Label ID="lblDocID" runat="server" Visible="false"></asp:Label>
                        <asp:Label ID="lblVisitedDepart" runat="server" Visible="false"></asp:Label>
                    </div>
                    <div class="row bspace">
                        <div class="col-md-4">
                            <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="btn btn-primary btn-block" OnClick="btnSave_Click" />
                        </div>
                        <div class="col-md-4">
                            <asp:Button ID="btnReset" runat="server" Text="Reset" CssClass="btn btn-primary btn-block" OnClick="btnReset_Click" CausesValidation="false" UseSubmitBehavior="false" />
                        </div>
                        <div class="col-md-4">
                            <asp:Button ID="btnPrint" runat="server" CssClass="btn btn-primary btn-block" Text="Print" OnClick="btnPrint_Click" Visible="false"/>
                            <asp:Button runat="server" ID="btnShow" CssClass="btn btn-primary btn-block" Text="Show" CausesValidation="false" UseSubmitBehavior="false" OnClick="btnShow_Click" Visible="false" />
                        </div>
                    </div>
                </section>
            </div>
            <asp:HiddenField ID="HiddenField4Grid" runat="server" />
            <cc1:ModalPopupExtender ID="modal_gridPopup" runat="server"
                BackgroundCssClass="modal fade" OkControlID="btnPopupOk1"
                PopupControlID="pnlGrid" TargetControlID="HiddenField4Grid">
            </cc1:ModalPopupExtender>
            <div class="modal-dialog modal-dialog-centered modal-dialog-centered modal-dialog-scrollable modal-lg"
                role="document" runat="server" id="pnlGrid">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="exampleModalCenterTitle">Patient Appointment</h5>
                        <button type="button" id="btnPopupOk1" runat="server" class="close" data-bs-dismiss="modal" aria-label="Close">
                            <i data-feather="x"></i>
                        </button>
                    </div>
                    <div class="modal-body">
                        <div class="row" id="table-hover-row">
                            <div class="col-12">
                                <div class="card">
                                    <div class="card-content">

                                        <table class="table table-hover table-responsive">
                                            <thead>
                                                <tr>
                                                    <%--    <th>VisitID</th>--%>
                                                    <th>VisitDate</th>
                                                    <th>Complaint</th>
                                                    <th>Treatment</th>
                                                    <th>FollowUp</th>
                                                    <%-- <td>Department Name</td>--%>
                                                    <th>ACTION</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <asp:Repeater ID="RepeaterPatientVisit" runat="server">
                                                    <ItemTemplate>
                                                        <tr>
                                                            <%--     <td class="text-bold-500"><%# Eval("VisitID") %></td>--%>
                                                            <td><%# Eval("VisitDate") %></td>
                                                            <td class="text-bold-500"><%# Eval("PrimComplaint") %></td>
                                                            <td><%# Eval("Treatment") %></td>
                                                            <td><%# Eval("FollowUps") %></td>
                                                            <td>
                                                                <div class="dropdown">
                                                                    <a class="btn btn-link font-24 p-0 line-height-1 no-arrow dropdown-toggle" href="#" role="button" data-toggle="dropdown">
                                                                        <i class="dw dw-more"></i>
                                                                    </a>
                                                                    <div class="dropdown-menu dropdown-menu-right dropdown-menu-icon-list">
                                                                        <asp:Button CssClass="dropdown-item" CausesValidation="false" UseSubmitBehavior="false" runat="server" ID="View" Text="View" OnClick="View_Click" CommandArgument='<%# Eval("GynacID") %>' />
                                                                    </div>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </ItemTemplate>
                                                </asp:Repeater>
                                            </tbody>
                                        </table>

                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <asp:Button CssClass="btn btn-light-secondary" Text="Close" runat="server" ID="btnClose" OnClick="btnClose_Click" CausesValidation="false" UseSubmitBehavior="false">
                            <%--  <i class="bx bx-x d-block d-sm-none"></i>
                            <span class="d-none d-sm-block">Close</span>--%>
                        </asp:Button>
                    </div>
                </div>
                <%--   </div>--%>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btnShow" />
            <asp:PostBackTrigger ControlID="btnSave" />
            <asp:PostBackTrigger ControlID="GridPatientImages" />
        </Triggers>
    </asp:UpdatePanel>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#btnShow').on('click', function () {
                $('#exampleModalCenter').modal('show');
            });
        });
    </script>
</asp:Content>

