<%@ page title="Dairy Form" language="C#" masterpagefile="~/DoctorMasterPage.master" autoeventwireup="true" inherits="DairyForm, 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>Dairy Form</h3>
                </div>
                <section class="section">
                    <div class="divider">
                        <div class="divider-text">Dairy Form</div>
                    </div>
                    <div class="row form-group bspace">
                        <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"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <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"></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-3">
                            <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"></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-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-2" style="visibility: hidden">
                            <label class="label">Agreement Date</label>--%>
                            <asp:TextBox ID="txtAgreement" runat="server" Visible="false" CssClass="form-control" TextMode="Date" placeholder="Agreement Date" AutoComplete="off"></asp:TextBox>
                        </div>
                    </div>
                    <div class="row bspace form-group" id="table" runat="server" visible="false" style="overflow: scroll">
                        <table class="table table-hover mb-0">
                            <thead>
                                <tr>
                                    <th>SrNo</th>
                                    <th>Species</th>
                                    <th>Breed</th>
                                    <th>CountOfAnimal</th>
                                </tr>
                            </thead>
                            <tbody>
                                <asp:Repeater ID="RepeatrPatientList" runat="server">
                                    <ItemTemplate>
                                        <tr>
                                            <td>
                                                <%# Eval("SrNo") %></td>
                                            <td><%# Eval("Species") %></td>
                                            <td class="text-bold-500"><%# Eval("Breed") %></td>
                                            <td><%# Eval("CountOfAnimal") %></td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </tbody>
                        </table>
                    </div>
                    <div class="row form-group bspace">
                        <div class="col-md-3">
                            <label class="label">Feeding Pattern</label>
                            <asp:TextBox ID="txtFeed" runat="server" Height="200" CssClass="form-control" TextMode="MultiLine" placeholder="Feed" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Feed</label>
                            <asp:TextBox ID="txtFeedingConcentrates" Height="200" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Feeding Time" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Milk Yeild </label>
                            <asp:TextBox ID="txtMilkYeild" runat="server" Height="200" CssClass="form-control" TextMode="MultiLine" placeholder="Milk Yeild" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Milking Time/Method</label>
                            <asp:TextBox ID="txtMilkingManagement" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Milking Time/Method" AutoComplete="off"></asp:TextBox>
                        </div>
                    </div>
                    <div class="row form-group bspace">
                        <div class="col-md-3">
                            <label class="label">Water Source</label>
                            <asp:TextBox ID="txtWaterSource" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Water Source" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Water Time</label>
                            <asp:TextBox ID="txtWaterTime" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Water Time" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-2">
                            <label class="label">Vaccination Schedule</label>
                            <asp:DropDownList ID="ddlVaccinationSchedule" runat="server" CssClass="form-select">
                                <asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>
                                <asp:ListItem Text="Updated" Value="1"></asp:ListItem>
                                <asp:ListItem Text="Due" Value="2"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="col-md-2">
                            <label class="label">Deworming Schedule</label>
                            <asp:DropDownList ID="ddlDeworming" runat="server" CssClass="form-select">
                                <asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>
                                <asp:ListItem Text="Yes" Value="1"></asp:ListItem>
                                <asp:ListItem Text="No" Value="2"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="col-md-2">
                            <label class="label">Ventilation In Shed</label>
                            <asp:DropDownList ID="ddlVentilation" runat="server" CssClass="form-select">
                                <asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>
                                <asp:ListItem Text="Yes" Value="1"></asp:ListItem>
                                <asp:ListItem Text="No" Value="2"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                    </div>
                    <div class="row form-group bspace">
                        <div class="col-md-3">
                            <label class="label">Floor Space Area</label>
                            <asp:TextBox ID="txtFloorSpace" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Area Of Shed" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Shed Cleaning</label>
                            <asp:TextBox ID="txtShedCleaning" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Shed Cleaning" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Waste Management</label>
                            <asp:TextBox ID="txtWasteMgmt" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Waste Management" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">SilagePlant</label>
                            <asp:TextBox ID="txtSilagePlant" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="SilagePlant" AutoComplete="off"></asp:TextBox>
                        </div>
                    </div>
                    <div class="row bspace form-group">
                    </div>
                    <div class="row">
                        <div class="col-md-3">
                            <label class="label">
                                Disease Managemnt</label>
                            <asp:TextBox ID="txtDiseaseManagemnt" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Disease Managemnt" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Heat/Estrous Detection</label>
                            <asp:TextBox ID="txtHeatEstrousDetection" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Heat or Estrous Detection" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Infertility Count</label>
                            <asp:TextBox ID="txtInfertilityCount" runat="server" CssClass="form-control" placeholder="Infertility Count" AutoComplete="off"></asp:TextBox>
                        </div>
                    </div>
                    <div class="row form-group bspace">
                        <div class="col-md-3">
                            <label class="label">Period Between Calving & Heat</label>
                            <asp:TextBox ID="txtPeriod" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Period Between Calbing & Heat" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Repeat Breeding Percentage</label>
                            <asp:TextBox ID="txtRepeatBreedingPer" runat="server" CssClass="form-control" placeholder="Repeat Breeding Percentage" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">First Calving Age</label>
                            <asp:TextBox ID="txtFirstCalvingAge" runat="server" CssClass="form-control" placeholder="First Calving Age" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Farm Diary</label>
                            <asp:TextBox ID="txtFarmDiary" runat="server" CssClass="form-control" placeholder="Farm Diary" AutoComplete="off"></asp:TextBox>
                        </div>
                    </div>
                    <div class="row bspace form-group">
                        <div class="divider">
                            <div class="divider-text">Calves Management</div>
                        </div>
                    </div>
                    <div class="row form-group bspace">
                        <div class="col-md-3">
                            <label class="label">Milk Requirement</label>
                            <asp:TextBox ID="txtMilkReq" runat="server" CssClass="form-control" placeholder="Milk Requirement" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Use of Bottle/Sulking</label>
                            <asp:DropDownList ID="ddlBottleSulking" runat="server" CssClass="form-select">
                                <asp:ListItem Text="Yes" Value="1"></asp:ListItem>
                                <asp:ListItem Text="No" Value="1"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Milk Replace</label>
                            <asp:TextBox ID="txtMilkReplacement" runat="server" CssClass="form-control" placeholder="Milk Replace" AutoComplete="off"></asp:TextBox>
                        </div>

                        <div class="col-md-3">
                            <label class="label">Calf Starter</label>
                            <asp:TextBox ID="txtCalfStarter" runat="server" CssClass="form-control" placeholder="Calf Starter" AutoComplete="off"></asp:TextBox>
                        </div>
                    </div>
                    <div class="row form-group bspace">
                        <div class="col-md-3">
                            <label class="label">Calf Water Start Age</label>
                            <asp:TextBox ID="txtCalfWaterStartAge" runat="server" CssClass="form-control" placeholder="Calf Water Start Age" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Ascites Observed</label>
                            <asp:TextBox ID="txtAscitesObserved" runat="server" CssClass="form-control" placeholder="Ascites Observed" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Concenrtates For Calves</label>
                            <asp:TextBox ID="txtConcenrtatesForCalves" runat="server" CssClass="form-control" placeholder="Concenrtates For Calves" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">First Heat Age</label>
                            <asp:TextBox ID="txtFirstHeatAge" runat="server" CssClass="form-control" placeholder="First Heat Age" AutoComplete="off"></asp:TextBox>
                        </div>
                    </div>
                    <div class="row form-group bspace">
                        <div class="col-md-4">
                            <label class="label">Mineral Mixture</label>
                            <asp:TextBox ID="txtMineralMixture" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Mineral Mixture" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-8">
                            <label class="label">Treatment </label>
                            <asp:TextBox ID="txtTreatment" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Treatment" AutoComplete="off"></asp:TextBox>
                        </div>
                    </div>
                    <div class="row bspace form-group">
                        <div class="col-md-3">
                            <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-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">Advice </label>
                            <asp:TextBox ID="txtAdvice" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Advice" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <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" HeaderStyle-CssClass="hideGridColumn" ItemStyle-CssClass="hideGridColumn" />
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lnkPath" runat="server"
                                            OnClick="lnkPath_Click" CommandArgument='<%# Eval("ImgPath") %>' Text="Open"></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                              <%--  <asp:CommandField ShowDeleteButton="true" />--%>
                            </Columns>
                        </asp:GridView>
                    </div>
                    <div class="row bspace 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 form-group">
                        <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" />
                        </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 ID="btnShow" runat="server" Text="Show" CssClass="btn btn-primary btn-block" OnClick="btnShow_Click" Visible="false" />
                        </div>
                    </div>
                </section>
            </div>
            <asp:HiddenField ID="HiddenField1" runat="server" />
            <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
                BackgroundCssClass="modal fade" OkControlID="btnAppointmentPanelClose"
                PopupControlID="AppointmentPanel" TargetControlID="HiddenField1">
            </cc1:ModalPopupExtender>
            <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable modal-lg"
                role="document" runat="server" id="AppointmentPanel">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="exampleModalCenterTitle">Patient Appointment</h5>
                    </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"><%# Esval("VisitID") %></td>--%>
                                                            <td><%# Eval("VisitDates") %></td>
                                                            <td class="text-bold-500"><%# Eval("Complaint") %></td>
                                                            <td><%# Eval("Assesment") %></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("DairyConsultID") %>' />
                                                                    </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="btnAppointmentPanelClose" OnClick="btnAppointmentPanelClose_Click" CausesValidation="false" UseSubmitBehavior="false"></asp:Button>
                    </div>
                </div>
                <%--   </div>--%>
            </div>
        </ContentTemplate>
         <Triggers>
            <asp:PostBackTrigger ControlID="btnShow" />
            <asp:PostBackTrigger ControlID="btnSave" />
            <asp:PostBackTrigger ControlID="GridPatientImages" />
        </Triggers>
   </asp:UpdatePanel>
</asp:Content>



