<%@ page language="VB" masterpagefile="~/Template/Master_Client.master" autoeventwireup="false" inherits="Clients_ClientTickets, MachSol.MachPanel.Web" %>

<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="CC/ViewTicketDetail.ascx" TagName="TicketDetail" TagPrefix="EM" %>
<%@ Register Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CPH_Content" runat="Server">

    <script type="text/javascript" language="javascript">
        function Reply(Id) {
            var array = Id.split('TxBx_Announcement');

            //var HF_Announcement = document.getElementById(array[0] + 'HF_Announcement');
            //HF_Announcement.value = str;
            //var Attachment = document.getElementById(array[0] + 'Attachment');
            //var HF_PostType = document.getElementById(array[0] + 'HF_PostType');


            var strTxBx_ReplySubject = document.getElementById(array[0] + 'TxBx_ReplySubject').value.trim();
            var strTxBx_Announcement = oboutGetEditor('TxBx_Announcement').getContent().trim();

            if (strTxBx_ReplySubject.length == 0) {
                alert("<%= Resources.Content.EnterSubject%>");
                return false;
            }
            else {
                if (strTxBx_Announcement.length == 0) {
                    alert("<%= Resources.Content.EnterReply%>");
                    return false;
                }
                else {
                    //alert(Attachment.value);
                    //if (Attachment.value != "") {
                    //    HF_PostType.value = "0";
                    //    __doPostBack('dummy', '');
                    //    //$object("_PageRequestManager")._doPostBack( "dummy", "" );
                    //    return false;
                    //}
                    //else {
                    //    //HF_PostType.value = "0";
                    //    return true;
                    //}
                }
            }
        }
    </script>

    <div class="col-xs-12">
        <div class="card">
            <div class="body">
                <%--<ajax:UpdatePanel ID="UP_Filter" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>--%>
                <asp:Panel ID="Pnl_Search" runat="server" DefaultButton="Btn_Search">
                    <div class="row">
                        <div class="panel-group search-panel" id="AS_ClientTickets" role="tablist" aria-multiselectable="true">
                            <div class="col-xs-12" role="tab" id="SH_ClientTickets">
                                <div class="card">
                                    <div class="header" role="button" data-toggle="collapse" data-parent="#AS_ClientTickets" href="#<%= CSB_ClientTickets.ClientID%>" aria-expanded="true" aria-controls="SH_ClientTickets">
                                        <h3>
                                            <%= Resources.Content.GN0000395%>
                                        </h3>
                                    </div>
                                    <div id="CSB_ClientTickets" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_ClientTickets" aria-expanded="false">
                                        <div class="row">
                                            <div class="col-md-3 col-sm-6 col-xs-12" runat="server" id="td_Owner">
                                                <div class="form-group form-float">
                                                    <asp:DropDownList ID="DDL_Department" runat="server" />
                                                </div>
                                            </div>
                                            <div class="col-md-3 col-sm-6 col-xs-12" runat="server" id="Div1">
                                                <div class="form-group form-float">
                                                    <asp:DropDownList ID="DDL_Status" runat="server" />
                                                </div>
                                            </div>
                                            <div class="col-md-3 col-sm-6 col-xs-12">
                                                <div class="form-group form-float">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_TicketNumber" runat="server" />
                                                        <asp:Label ID="Literal1" runat="server" Text="<%$Resources:Content,REL1061%>" EnableViewState="false" CssClass="form-label" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-3 col-sm-6 col-xs-12">
                                                <div class="form-group form-float">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_TicketSubject" runat="server" />
                                                        <asp:Label ID="Literal2" runat="server" Text="<%$Resources:Content,GN0000371%>"
                                                            EnableViewState="false" CssClass="form-label" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-xs-12">
                                                <asp:Button CssClass="btn btn-primary waves-effect" ID="Btn_Search" runat="server" SkinID="searchButton" Text='<%$ Resources:Content,GN0000391 %>' />
                                                <asp:Button CssClass="btn btn-primary waves-effect" ID="Btn_Clear" Visible="false" runat="server" SkinID="searchButton"
                                                    Text='<%$ Resources:Content,String289  %>' />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </asp:Panel>
                <%-- </ContentTemplate>
                </ajax:UpdatePanel>--%>

                <%--  <ajax:UpdatePanel ID="UP_Tickets" runat="server" UpdateMode="Always">
                    <ContentTemplate>--%>
                <EM:TabContainer ID="TC_Tickets" runat="server" OnClientActiveTabChanged="loadTabPanel">
                    <EM:TabPanel ID="TP_Active" HeaderText='<%$ Resources:Content,GN0000366 %>' runat="server">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab0" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent0" runat="server">
                                <asp:GridView ID="GV_Tickets" EmptyDataText="<%$ Resources:Content,SMI0012%>" DataSourceID="SqlDS_Tickets"
                                    runat="server" AllowPaging="True" AllowSorting="True" CssClass="table table-bordered table-hover table-responsive table-striped" AutoGenerateColumns="false">
                                    <Columns>
                                        <asp:TemplateField SortExpression="TicketNumber" HeaderStyle-CssClass="col-xs-2" HeaderText='<%$ Resources:Content,REL1061 %>'>
                                            <ItemTemplate>
                                                <asp:LinkButton ID="LB_TicketNumber" CommandName="View" runat="server" />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField SortExpression="Subject" HeaderStyle-CssClass="col-xs-2" HeaderText='<%$ Resources:Content,GN0000371 %>'>
                                            <ItemTemplate>
                                                <div id="Div_Subject" runat="server">
                                                </div>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField SortExpression="DepartmentName" HeaderStyle-CssClass="col-xs-2" HeaderText='<%$ Resources:Content,GN0000374 %>'>
                                            <ItemTemplate>
                                                <div id="Div_DepartmentName" runat="server">
                                                </div>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderStyle-CssClass="col-xs-2" HeaderText='<%$ Resources:Content,GN0001300 %>'>
                                            <ItemTemplate>
                                                <div id="Div_Priority" runat="server">
                                                </div>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderStyle-CssClass="col-xs-2" HeaderText='<%$ Resources:Content,String385 %>'>
                                            <ItemTemplate>
                                                <asp:Label ID="lbl_Status" runat="server" />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderStyle-CssClass="col-xs-2" HeaderText='<%$ Resources:Content,GN0000376 %>'>
                                            <ItemTemplate>
                                                <div id="Div_Duration" runat="server">
                                                </div>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <HeaderStyle Font-Bold="True" ForeColor="White" />
                                    <PagerTemplate>
                                        <EM:Pager ID="Pager1" runat="server" />
                                    </PagerTemplate>
                                </asp:GridView>
                                <asp:SqlDataSource ID="SqlDS_Tickets" runat="server"></asp:SqlDataSource>
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>
                    <EM:TabPanel ID="TP_Detail" HeaderText='<%$ Resources:Content,SM400022 %>' Enabled="false" runat="server">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab1" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent1" runat="server" Visible="false">
                                <EM:TicketDetail ID="t_Detail" runat="server" />
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>
                </EM:TabContainer>
                <%-- </ContentTemplate>
                </ajax:UpdatePanel>--%>
                <%--Required for Attachment--%>
                <div id="dummy" style="display: none">
                </div>
                <%-- End Required for Attachment--%>
            </div>
        </div>
    </div>
</asp:Content>
