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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="Ajax" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="UC" %>
<%@ Register Src="~/Template/CC/Selectable_Selected_LBX.ascx" TagName="AddSelectableSelected" TagPrefix="UC" %>

<%@ Register TagPrefix="cc1" Namespace="System.Web.UI" Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CPH_Content" runat="Server">
    <div class="col-xs-12">
        <div class="card">
            <div class="body">
                <ajax:TabContainer ID="TC_ExchMigrations" runat="server" OnClientActiveTabChanged="loadTabPanel">
                    <ajax:TabPanel ID="Tab_ExchMigrations" runat="server" HeaderText="<%$Resources:Content,SMI6099 %>">
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab0" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent0" runat="server">
                                <div class="row">
                                    <div class="col-xs-12">
                                        <div class="card">
                                            <div class="header">
                                                <h3>
                                                    <%= Resources.Content.SSM1000019 %>            
                                                </h3>
                                            </div>
                                            <div class="body">
                                                <div class="row">
                                                    <div class="col-md-3 col-xs-12">
                                                        <asp:Literal ID="Ltrl_SelectServer" runat="server" Text="<%$ Resources:Content,L00106 %>"></asp:Literal>:
                                                    </div>
                                                    <div class="col-md-6 col-xs-12">
                                                        <asp:DropDownList ID="Ddl_Server" runat="server" CssClass="ddl-stats-server" AutoPostBack="false" onchange="loadStats()"></asp:DropDownList>
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-xs-12">
                                                        <h4>
                                                            <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Content, StrBatches%>"></asp:Literal></h4>
                                                    </div>
                                                    <div class="col-md-8 col-xs-12">
                                                        <table class="table table-bordered table-striped" id="table-batches-stats">
                                                            <tbody>
                                                                <tr class="tr-heading">
                                                                    <th rowspan='2'>
                                                                        <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content,Status %>" />
                                                                    </th>
                                                                    <th rowspan='2'>
                                                                        <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:Content,strCount %>" />
                                                                    </th>
                                                                    <th colspan='5' class="text-center">
                                                                        <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:Content,DGN1110406 %>" />
                                                                    </th>
                                                                </tr>
                                                                <tr class="tr-heading">

                                                                    <th>
                                                                        <asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:Content,GN000114 %>" />
                                                                    </th>

                                                                    <th>
                                                                        <asp:Literal ID="Literal7" runat="server" Text="<%$ Resources:Content,Synced %>" />
                                                                    </th>

                                                                    <th>
                                                                        <asp:Literal ID="Literal8" runat="server" Text="<%$ Resources:Content,strFailed %>" />
                                                                    </th>

                                                                    <th>
                                                                        <asp:Literal ID="Literal10" runat="server" Text="<%$ Resources:Content,DGN1119971 %>" />
                                                                    </th>

                                                                    <th>
                                                                        <asp:Literal ID="Literal9" runat="server" Text="<%$ Resources:Content,String347 %>" />
                                                                    </th>

                                                                </tr>
                                                                <tr>
                                                                    <td>0</td>
                                                                    <td>0</td>
                                                                    <td>0</td>
                                                                    <td>0</td>
                                                                    <td>0</td>
                                                                    <td>0</td>
                                                                    <td>0</td>
                                                                </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                    <div class="col-md-4 col-xs-12 m-t--25">
                                                        <canvas id="batch-stats-chart"></canvas>
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-xs-12">
                                                        <h4>
                                                            <asp:Literal ID="Ltrl_MailboxesStatsHeading" runat="server" Text="<%$ Resources:Content,DGN1110406 %>"></asp:Literal></h4>
                                                    </div>
                                                    <div class="col-md-8 col-xs-12">
                                                        <table class="table table-bordered table-striped" id="table-mailboxes-stats">
                                                            <tbody>
                                                                <tr class="tr-heading">
                                                                    <th rowspan='2'>
                                                                        <asp:Literal ID="Ltrl_Stats_Mailboxes" runat="server" Text="<%$ Resources:Content,Status %>" />
                                                                    </th>
                                                                    <th rowspan='2'>
                                                                        <asp:Literal ID="Ltrl_Stats_Count" runat="server" Text="<%$ Resources:Content,strCount %>" />
                                                                    </th>
                                                                    <th colspan='4' class="text-center">
                                                                        <asp:Literal ID="Ltrl_Stats_Items" runat="server" Text="<%$ Resources:Content,MachItems %>" />
                                                                    </th>
                                                                </tr>
                                                                <tr class="tr-heading">

                                                                    <th>
                                                                        <asp:Literal ID="Ltrl_Stats_TotalItems" runat="server" Text="<%$ Resources:Content,GN000114 %>" />
                                                                    </th>

                                                                    <th>
                                                                        <asp:Literal ID="Ltrl_Stats_SyncedItems" runat="server" Text="<%$ Resources:Content,Synced %>" />
                                                                    </th>

                                                                    <th>
                                                                        <asp:Literal ID="Ltrl_Stats_SkippedItems" runat="server" Text="<%$ Resources:Content,strSkipped %>" />
                                                                    </th>

                                                                    <th>
                                                                        <asp:Literal ID="Ltrl_Stats_RemainingItems" runat="server" Text="<%$ Resources:Content,String347 %>" />
                                                                    </th>

                                                                </tr>
                                                                <tr>
                                                                    <td>0</td>
                                                                    <td>0</td>
                                                                    <td>0</td>
                                                                    <td>0</td>
                                                                    <td>0</td>
                                                                    <td>0</td>
                                                                </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                    <div class="col-md-4 col-xs-12 m-t--25">
                                                        <canvas id="mailbox-stats-chart"></canvas>
                                                    </div>
                                                </div>

                                                <script>

                                                    function loadStats() {

                                                        let server = $('select.ddl-stats-server').val();

                                                        if (server && server != null && server != undefined && server != '') {
                                                            jQuery.ajax({

                                                                url: '/RCC/Exchange/MailboxMigration.aspx/GetMigrationStats',

                                                                type: "POST",

                                                                dataType: "json",

                                                                data: "{'ServerId': '" + server + "'}",

                                                                contentType: "application/json; charset=utf-8",

                                                                success: function (data) {
                                                                    if (data && data.d) {
                                                                        var response = JSON.parse(data.d);
                                                                        if (response.batchData)
                                                                            initBatchStats(response.batchData);
                                                                        if (response.mailboxData)
                                                                            initMailboxStats(response.mailboxData);
                                                                    }
                                                                }
                                                            });
                                                        }
                                                    }

                                                    function initBatchStats(stats) {
                                                        let server = $('select.ddl-stats-server').val();
                                                        var ctx = document.getElementById('batch-stats-chart').getContext('2d');

                                                        var mailboxesChart = new Chart(ctx, {
                                                            type: 'doughnut',
                                                            data: {
                                                                labels: stats.chartLabels, //['Completed', 'Failed', 'Pending', 'Stopped', 'Syncing'],
                                                                datasets: [{
                                                                    data: stats.chartData,
                                                                    backgroundColor: ['rgba(110, 19, 236,0.6)', 'rgba(255, 0, 0, 0.6)', 'rgba(0, 0, 255, 0.6)', 'rgba(253, 208, 53, 0.6)', 'rgba(0, 255, 0, 0.6)'],
                                                                    borderColor: ['rgba(110, 19, 236,0.9)', 'rgba(255, 0, 0, 0.9)', 'rgba(0, 0, 255, 0.9)', 'rgba(253, 208, 53, 0.9)', 'rgba(0, 255, 0, 0.9)'],
                                                                    borderWidth: 1
                                                                }]
                                                            },
                                                            options: {
                                                                legend: {
                                                                    display: true,
                                                                    position: 'right',
                                                                    align: 'center'
                                                                },
                                                                title: {
                                                                    display: true,
                                                                    text: ''
                                                                }
                                                            }
                                                        });

                                                        var gridStats = stats.gridData;
                                                        $('#table-batches-stats').find('tr:not(.tr-heading)').remove();
                                                        for (var x = 0; x < gridStats.length; x++) {
                                                            var $newRow = $('<tr></tr>');

                                                            $('<td></td>')
                                                                .append(
                                                                    $('<a></a>')
                                                                        .attr('href', '/RCC/Exchange/MailboxMigration.aspx?T=2&Server=' + server + '&Status=' + gridStats[x].status)
                                                                        .html(gridStats[x].status)
                                                                )
                                                                .appendTo($newRow);
                                                            $('<td></td>').html(gridStats[x].count).appendTo($newRow);
                                                            $('<td></td>').html(gridStats[x].totalItems).appendTo($newRow);
                                                            $('<td></td>').html(gridStats[x].syncedItems).appendTo($newRow);
                                                            $('<td></td>').html(gridStats[x].failedItems).appendTo($newRow);
                                                            $('<td></td>').html(gridStats[x].stoppedItems).appendTo($newRow);
                                                            $('<td></td>').html(gridStats[x].pendingItems).appendTo($newRow);
                                                            $newRow.appendTo('#table-batches-stats tbody')
                                                        }
                                                    }

                                                    function initMailboxStats(stats) {
                                                        let server = $('select.ddl-stats-server').val();
                                                        var ctx = document.getElementById('mailbox-stats-chart').getContext('2d');

                                                        var mailboxesChart = new Chart(ctx, {
                                                            type: 'doughnut',
                                                            data: {
                                                                labels: stats.chartLabels, //['Completed', 'Failed', 'Pending', 'Stopped', 'Syncing'],
                                                                datasets: [{
                                                                    data: stats.chartData,
                                                                    backgroundColor: ['rgba(110, 19, 236,0.6)', 'rgba(255, 0, 0, 0.6)', 'rgba(0, 0, 255, 0.6)', 'rgba(253, 208, 53, 0.6)', 'rgba(0, 255, 0, 0.6)'],
                                                                    borderColor: ['rgba(110, 19, 236,0.9)', 'rgba(255, 0, 0, 0.9)', 'rgba(0, 0, 255, 0.9)', 'rgba(253, 208, 53, 0.9)', 'rgba(0, 255, 0, 0.9)'],
                                                                    borderWidth: 1
                                                                }]
                                                            },
                                                            options: {
                                                                legend: {
                                                                    display: true,
                                                                    position: 'right',
                                                                    align: 'center'
                                                                },
                                                                title: {
                                                                    display: true,
                                                                    text: ''
                                                                }
                                                            }
                                                        });

                                                        var gridStats = stats.gridData;
                                                        $('#table-mailboxes-stats').find('tr:not(.tr-heading)').remove();
                                                        for (var x = 0; x < gridStats.length; x++) {
                                                            var $newRow = $('<tr></tr>');

                                                            $('<td></td>')
                                                                .append(
                                                                    $('<a></a>')
                                                                        .attr('href', '/RCC/Exchange/MailboxMigration.aspx?T=3&Server=' + server + '&Status=' + gridStats[x].status)
                                                                        .html(gridStats[x].status)
                                                                )
                                                                .appendTo($newRow);
                                                            $('<td></td>').html(gridStats[x].count).appendTo($newRow);
                                                            $('<td></td>').html(gridStats[x].totalItems).appendTo($newRow);
                                                            $('<td></td>').html(gridStats[x].syncedItems).appendTo($newRow);
                                                            $('<td></td>').html(gridStats[x].skippedItems).appendTo($newRow);
                                                            $('<td></td>').html(gridStats[x].remainingItems).appendTo($newRow);
                                                            $newRow.appendTo('#table-mailboxes-stats tbody')
                                                        }
                                                    }

                                                    $(function () {
                                                        setTimeout(() => { loadStats(); }, 500);
                                                    });

                                                </script>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </ContentTemplate>
                    </ajax:TabPanel>

                    <ajax:TabPanel ID="Tab_ExchEndpoints" runat="server" HeaderText='<%$ Resources:Content,StrEndpoints %>'>
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab1" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent1" runat="server" Visible="false">
                                <asp:Panel ID="Pnl_EndpointListing" runat="server">
                                    <div class="row Div_OpsRow" id="Div_OpsRow" runat="server">
                                        <div class="col-xs-12">
                                            <div class="card">
                                                <div class="header">
                                                    <h3>
                                                        <%= Resources.Content.GN00001320%>                                                                                                                                 
                                                    </h3>
                                                </div>
                                                <div class="body">
                                                    <asp:Button ID="Btn_AddNew" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,AddNewEndpoint%>" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <asp:Panel CssClass="row" ID="Pnl_Search" runat="server" DefaultButton="Btn_Search">
                                        <div class="panel-group search-panel" id="AS_EndpointList" role="tablist" aria-multiselectable="true">
                                            <div class="col-xs-12" role="tab" id="SH_EndpointList">
                                                <div class="card">
                                                    <div class="header" role="button" data-toggle="collapse" data-parent="#AS_EndpointList" href="#<%= CSB_EndpointList.ClientID %>"
                                                        aria-expanded="true" aria-controls="SH_EndpointList">
                                                        <h3>
                                                            <%= Resources.Content.GN0000395%>
                                                        </h3>
                                                    </div>
                                                    <div id="CSB_EndpointList" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_EndpointList"
                                                        aria-expanded="false">
                                                        <div class="row">
                                                            <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_SearchEndpointName" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Lbl_SearchEndpointName" runat="server" EnableViewState="false"
                                                                            Text="<%$ Resources:Content,strEndpointName %>" class="form-label"></asp: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_SearchEndpointDomain" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Lbl_SearchEndpointDomain" runat="server" EnableViewState="false"
                                                                            Text="<%$ Resources:Content,GN0000653 %>" class="form-label"></asp: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_SearchEndpointOrg" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Lbl_SearchEndpointOrg" runat="server" EnableViewState="false"
                                                                            Text="<%$ Resources:Content,DGN1110608%>" class="form-label"></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-2 col-sm-6 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:Button ID="Btn_Search" runat="server" class="btn btn-primary waves-effect"
                                                                        Text="<%$ Resources:Content,GN0000391%>" />
                                                                    <asp:Button ID="Btn_Clear" Visible="false" class="btn btn-primary waves-effect" runat="server"
                                                                        Text="<%$ Resources:Content,String289 %>" />
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </asp:Panel>

                                    <asp:GridView ID="GV_EndpointList" runat="server" AllowPaging="false" AllowSorting="false" AutoGenerateColumns="False"
                                        CssClass="table table-bordered table-striped table-hover" EmptyDataText="<%$ Resources:Content, GN00001375 %>">
                                        <Columns>

                                            <asp:TemplateField HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3" HeaderText='<%$ Resources:Content, strEndpointName %>'>
                                                <ItemTemplate>
                                                    <asp:Literal ID="Ltrl_EndpointName" runat="server" Text='<%# Eval("EndpointName") %>' />
                                                    <asp:HiddenField ID="HF_ExchangeEndpointId" runat="server" Value='<%# Eval("ExchangeEndpointId") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3" HeaderText='<%$ Resources:Content, GN0000653 %>'>
                                                <ItemTemplate>
                                                    <asp:Literal ID="Ltrl_Domain" runat="server" Text='<%# Eval("EndpointDomain") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2" HeaderText='<%$ Resources:Content, DateCreated %>'>
                                                <ItemTemplate>
                                                    <asp:Literal ID="Ltrl_DateCreated" runat="server" Text='<%# Eval("DateCreated") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2" HeaderText='<%$ Resources:Content, TotalBatches %>'>
                                                <ItemTemplate>
                                                    <asp:Literal ID="Ltrl_TotalBatches" runat="server" Text='<%# Eval("ActiveBatches") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderStyle-CssClass="col-xs-2 align-center" ItemStyle-CssClass="col-xs-2"
                                                HeaderText='<%$ Resources:Content, GN00001320 %>'>
                                                <ItemTemplate>
                                                    <ul class="option-menu">
                                                        <li class="dropdown">
                                                            <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button"
                                                                aria-haspopup="true" aria-expanded="false">
                                                                <i class="material-icons">menu</i>
                                                            </a>
                                                            <ul class="dropdown-menu pull-right">
                                                                <li>
                                                                    <asp:LinkButton ID="Lbtn_AddNewBatch" CssClass="btnAction" runat="server" Text="<%$Resources:Content,AddNewBatch %>"
                                                                        CommandArgument='<%# String.Format("{0}↝{1}↝{2}↝{3}",Eval("EndpointId"),Eval("TargetOrganizationId"),Eval("EndpointDomain"),Eval("ExchangeEndpointId")) %>' CommandName="newbatch"></asp:LinkButton>
                                                                </li>
                                                                <li>
                                                                    <asp:LinkButton ID="Lbtn_Edit" runat="server" Text="<%$Resources:Content,Edit %>"
                                                                        CommandArgument='<%# Eval("EndpointId")%>' CommandName="change"></asp:LinkButton>
                                                                </li>
                                                                <li>
                                                                    <asp:LinkButton ID="IB_Delete" CssClass="btnAction" Text="<%$ Resources:Content,GN0000377%>"
                                                                        CommandArgument='<%#Eval("EndpointId")%>' CommandName="remove" runat="server" />
                                                                </li>
                                                                <ajax:ConfirmButtonExtender ID="CBE_Remove" runat="server" TargetControlID="IB_Delete"
                                                                    ConfirmText='<%# Resources.Content.ConfirmAction.Replace("%action-text%",Eval("EndpointName")) %>'>
                                                                </ajax:ConfirmButtonExtender>
                                                            </ul>
                                                        </li>
                                                    </ul>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>

                                </asp:Panel>
                                <asp:Panel ID="Pnl_EndpointDetail" runat="server">
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <div class="card">
                                                <div class="header">
                                                    <h3>
                                                        <%= Resources.Content.EndpointDetails %>                           
                                                    </h3>
                                                </div>
                                                <div class="body">
                                                    <%--Name (Input box, Max-Length: 100 Unique, required)--%>
                                                    <div class="row">
                                                        <div class="col-md-4 col-xs-12 row-label">
                                                            *
                                                            <asp:Literal ID="Ltrl_EndpointName" runat="server" Text="<%$ Resources:Content,strEndpointName%>" />:
                                                        </div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBx_EndpointName" runat="server" MaxLength="100" />
                                                                </div>
                                                                <asp:RequiredFieldValidator ID="RFV_EndpointName" runat="server" ControlToValidate="TxBx_EndpointName" SetFocusOnError="true" ValidationGroup="endpointdetail" Display="None"></asp:RequiredFieldValidator>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <%--Domain (Selection box [Fill exchange organization domains])--%>
                                                    <div class="row">
                                                        <div class="col-md-4 col-xs-12 row-label">
                                                            *
                                                            <asp:Literal ID="Ltrl_Domain" runat="server" Text="<%$ Resources:Content,DGN1110334%>" />:
                                                        </div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <asp:DropDownList ID="Ddl_Domains" runat="server"></asp:DropDownList>
                                                        </div>
                                                    </div>
                                                    <%--Source mailbox email address (input box, required, email format, valid mailbox on source)--%>
                                                    <div class="row">
                                                        <div class="col-md-4 col-xs-12 row-label">
                                                            <label>
                                                                *
                                                                <asp:Literal ID="Ltrl_SourcemailboxEmail" runat="server" Text="<%$ Resources:Content,SrcMbxEmailAddress%>" />:</label>
                                                        </div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBx_SourcemailboxEmail" MaxLength="128" runat="server"></asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="RFV_SourcemailboxEmail" runat="server" ControlToValidate="TxBx_SourcemailboxEmail"
                                                                        Display="None" SetFocusOnError="True" ValidationGroup="endpointdetail"></asp:RequiredFieldValidator>
                                                                </div>
                                                            </div>
                                                            <%--<asp:RegularExpressionValidator ID="REV_SourcemailboxEmail" ValidationGroup="endpointdetail"
                                                                SetFocusOnError="true" ControlToValidate="TxBx_SourcemailboxEmail" runat="server"
                                                                ValidationExpression="<%$ Resources:MPRegex,EmailAddress%>"
                                                                Display="None" ErrorMessage='<%$ Resources:Content,SrcMbxEmailAddressNotValid %>'></asp:RegularExpressionValidator>--%>
                                                        </div>
                                                    </div>
                                                    
                                                    <div style="position:fixed; top:-100px; left:-100px;opacity:0.0;">
                                                        <input type="text" id="dummmy_login" />
                                                        <input type="password" id="dummy-pass"/>
                                                    </div>

                                                    <%--Source admin login (Input box, required) windows logon format (domain\username) --%>
                                                    <div class="row">
                                                        <div class="col-md-4 col-xs-12 row-label">
                                                            <label>
                                                                *
                                                                <asp:Literal ID="Ltrl_SourceAdminLogin" runat="server" Text="<%$ Resources:Content,SrcAdminLogin%>" />:</label>
                                                        </div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBx_SrcAdminLogin" MaxLength="128" runat="server"></asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="RFV_SrcAdminLogin" runat="server" ControlToValidate="TxBx_SrcAdminLogin"
                                                                        Display="None" SetFocusOnError="True" ValidationGroup="endpointdetail"></asp:RequiredFieldValidator>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    
                                                    <%--Source admin pass (Input box, required) --%>
                                                    <div class="row">
                                                        <div class="col-md-4 col-xs-12 row-label">
                                                            <label>
                                                                *
                                                                <asp:Literal ID="Ltrl_SrcAdminPassword" runat="server" Text="<%$ Resources:Content,SrcAdminPassword%>" />:</label>
                                                        </div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBx_SrcAdminPassword" MaxLength="128" runat="server" TextMode="Password"></asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="RFV_SrcAdminPassword" runat="server" ControlToValidate="TxBx_SrcAdminPassword"
                                                                        Display="None" SetFocusOnError="True" ValidationGroup="endpointdetail"></asp:RequiredFieldValidator>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-md-4 col-xs-12"></div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <asp:UpdatePanel ID="UP_TestConnectivity" runat="server" UpdateMode="Always" ChildrenAsTriggers="true">
                                                                <ContentTemplate>
                                                                    <asp:Button ID="Btn_TestConnectivity" runat="server" Text="<%$ Resources:Content,TestEndpointConnectivity %>" CssClass="btn btn-primary waves-effect" CausesValidation="true" ValidationGroup="endpointdetail" />
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                            
                                                        </div>
                                                    </div>
                                                    <%--Max Concurrent Migrations (input box, optional, numeric, max-length: 9)--%>
                                                    <div class="row">
                                                        <div class="col-md-4 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Ltrl_MaxConcurrentMigrations" runat="server" Text="<%$ Resources:Content,MaxConcurrentMigrations%>" />:
                                                            </label>
                                                        </div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBx_MaxConcurrentMigrations" Text="100" MaxLength="9" runat="server"></asp:TextBox>
                                                                    <ajax:FilteredTextBoxExtender ID="FTE_MaxConcurrentMigrations" runat="server"
                                                                        FilterType="Numbers" TargetControlID="TxBx_MaxConcurrentMigrations">
                                                                    </ajax:FilteredTextBoxExtender>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <%--Max Concurrent Incremental Sync (Input box, optional, numeric, max-length: 9)--%>
                                                    <div class="row">
                                                        <div class="col-md-4 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Ltrl_MaxConcurrentIncrementalSync" runat="server"
                                                                    Text="<%$ Resources:Content,MaxConcurrentIncrementalSync%>" />:
                                                            </label>
                                                        </div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBx_MaxConcurrentIncrementalSync" Text="20" MaxLength="9" runat="server"></asp:TextBox>
                                                                    <ajax:FilteredTextBoxExtender ID="FTE_MaxConcurrentIncrementalSync" runat="server"
                                                                        FilterType="Numbers" TargetControlID="TxBx_MaxConcurrentIncrementalSync">
                                                                    </ajax:FilteredTextBoxExtender>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-md-4 col-xs-12"></div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <asp:Button ID="Btn_SaveEndpoint" runat="server" Text="<%$ Resources:Content,Save%>" CausesValidation="true"
                                                                ValidationGroup="endpointdetail" class="btn btn-primary waves-effect btnAction" />
                                                            &nbsp;
                                                            <asp:Button ID="Btn_CancelSaveEndpoint" runat="server" Text="<% $ Resources:Content,Cancel %>"
                                                                CausesValidation="false" class="btn btn-primary waves-effect" />
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </asp:Panel>
                            </asp:Panel>
                        </ContentTemplate>
                    </ajax:TabPanel>

                    <ajax:TabPanel ID="Tab_EndpointBatches" runat="server" HeaderText='<%$ Resources:Content,StrBatches %>'>
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab2" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent2" runat="server" Visible="false">
                                <asp:Panel ID="Pnl_BatchesListing" runat="server">

                                    <div class="row Div_OpsRow" id="Div_OpsRow2" runat="server">
                                        <div class="col-xs-12">
                                            <div class="card">
                                                <div class="header">
                                                    <h3>
                                                        <%= Resources.Content.GN00001320%>
                                                    </h3>
                                                </div>
                                                <div class="body">
                                                    <asp:Button ID="Btn_AddNewBatch" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,AddNewBatch%>" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <asp:Panel CssClass="row" ID="Pnl_BatchSearchBox" runat="server" DefaultButton="Btn_SearchBatch">
                                        <div class="panel-group search-panel" id="AS_BatchList" role="tablist" aria-multiselectable="true">
                                            <div class="col-xs-12" role="tab" id="SH_BatchList">
                                                <div class="card">
                                                    <div class="header" role="button" data-toggle="collapse" data-parent="#AS_BatchList" href="#<%= CSB_BatchList.ClientID %>"
                                                        aria-expanded="true" aria-controls="SH_BatchList">
                                                        <h3>
                                                            <%= Resources.Content.GN0000395%>
                                                        </h3>
                                                    </div>
                                                    <div id="CSB_BatchList" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_BatchList"
                                                        aria-expanded="false">
                                                        <div class="row">
                                                            <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_SearchBatchName" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Lbl_SearchBatchName" runat="server" EnableViewState="false"
                                                                            Text="<%$ Resources:Content,BatchName %>" class="form-label"></asp: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_SearchBatchEndpoint" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Lbl_SearchBatchEndpoint" runat="server" EnableViewState="false"
                                                                            Text="<%$ Resources:Content,strEndpointName %>" class="form-label"></asp: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_SearchBatchDomain" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Lbl_SearchBatchDomain" runat="server" EnableViewState="false"
                                                                            Text="<%$ Resources:Content,GN0000653%>" class="form-label"></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                                                                                        <div class="col-md-3 col-sm-6 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:DropDownList ID="Ddl_SearchBatchServer" runat="server"></asp:DropDownList>
                                                                </div>
                                                            </div>
                                                            <div class="col-md-3 col-sm-6 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:DropDownList ID="Ddl_SearchBatchStatus" runat="server">
                                                                        <asp:ListItem Text="--All--" Value=""></asp:ListItem>
                                                                        <asp:ListItem Text="Completed" Value="Completed"></asp:ListItem>
                                                                        <asp:ListItem Text="CompletedWithErrors" Value="CompletedWithErrors"></asp:ListItem>
                                                                        <asp:ListItem Text="Completing" Value="Completing"></asp:ListItem>
                                                                        <asp:ListItem Text="Corrupted" Value="Corrupted"></asp:ListItem>
                                                                        <asp:ListItem Text="Created" Value="Created"></asp:ListItem>
                                                                        <asp:ListItem Text="Failed" Value="Failed"></asp:ListItem>
                                                                        <asp:ListItem Text="IncrementalSyncing" Value="IncrementalSyncing"></asp:ListItem>
                                                                        <asp:ListItem Text="Removing" Value="Removing"></asp:ListItem>
                                                                        <asp:ListItem Text="Starting" Value="Starting"></asp:ListItem>
                                                                        <asp:ListItem Text="Stopped" Value="Stopped"></asp:ListItem>
                                                                        <asp:ListItem Text="Syncing" Value="Syncing"></asp:ListItem>
                                                                        <asp:ListItem Text="Stopping" Value="Stopping"></asp:ListItem>
                                                                        <asp:ListItem Text="Synced" Value="Synced"></asp:ListItem>
                                                                        <asp:ListItem Text="SyncedwithErrors" Value="SyncedwithErrors"></asp:ListItem>
                                                                        <asp:ListItem Text="Waiting" Value="Waiting"></asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </div>
                                                            </div>
                                                            <div class="col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:Button ID="Btn_SearchBatch" runat="server" class="btn btn-primary waves-effect"
                                                                        Text="<%$ Resources:Content,GN0000391%>" />
                                                                    <asp:Button ID="Btn_ClearBatch" Visible="false" class="btn btn-primary waves-effect" runat="server"
                                                                        Text="<%$ Resources:Content,String289 %>" />
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </asp:Panel>

                                    <asp:GridView CssClass="table table-bordered table-striped table-hover"
                                        EmptyDataText="<%$ Resources:Content, GN00001375 %>"
                                        ID="GV_BatchList" AllowPaging="true" AllowSorting="true" runat="server" AutoGenerateColumns="False">
                                        <Columns>

                                            <%--<asp:TemplateField HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3" HeaderText='<%$ Resources:Content, strEndpointName %>'>
                                                <ItemTemplate>
                                                    <asp:Literal ID="Ltrl_EndpointName" runat="server" Text='<%# Eval("EndpointName") %>' />
                                                    <asp:HiddenField ID="HF_ExchangeBatchId" runat="server" Value='<%# Eval("ExchangeBatchId") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>--%>
                                            <asp:TemplateField HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3" HeaderText='<%$ Resources:Content, strBatch %>'>
                                                <ItemTemplate>
                                                    <asp:Literal ID="Ltrl_BatchName" runat="server" Text='<%# Eval("BatchName") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <%--<asp:TemplateField HeaderStyle-CssClass="col-xs-7" ItemStyle-CssClass="col-xs-7" HeaderText='<%$ Resources:Content, TargetOrganization %>'>
                                                <ItemTemplate>
                                                    <asp:HyperLink ID="Ltrl_TargetOrganization" runat="server" Text='<%# String.Format("{0} [{1}]",Eval("OrganizationName"), Eval("EndpointDomain")) %>' NavigateUrl='<%# String.Format("/RCC/Exchange/ExAccountDetail.aspx?oID={0}", Eval("TargetOrganizationId")) %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>--%>
                                            <asp:TemplateField HeaderStyle-CssClass="col-xs-8" ItemStyle-CssClass="col-xs-7" HeaderText='<%$ Resources:Content, Detail %>'>
                                                <ItemTemplate>
                                                    <%--<asp:Literal ID="Ltrl_Status" runat="server" Text='<%# Eval("BatchStatus") %>' />--%>
                                                    <asp:HiddenField ID="HF_ExchangeBatchId" runat="server" Value='<%# Eval("ExchangeBatchId") %>' />
                                                    <div class="table small">
                                                        <div class="row">
                                                            <div class="row-label col-xs-2"><%= Resources.Content.StrEndpoint%>:</div>
                                                            <div class="col-xs-4">
                                                                <%# Eval("EndpointName") %>
                                                            </div>
                                                            <div class="row-label col-xs-2"><%= Resources.Content.strOrganization%>:</div>
                                                            <div class="col-xs-4">
                                                                <asp:HyperLink ID="Ltrl_TargetOrganization" runat="server" Text='<%# String.Format("{0} [{1}]",Eval("OrganizationName"), Eval("EndpointDomain")) %>' NavigateUrl='<%# String.Format("/RCC/Exchange/ExAccountDetail.aspx?oID={0}", Eval("TargetOrganizationId")) %>' />
                                                            </div>
                                                        </div>

                                                        <div class="row">
                                                            <div class="row-label col-xs-2"><%= Resources.Content.Status%>:</div>
                                                            <div class="col-xs-4">
                                                                <%# Eval("BatchStatus") %>
                                                            </div>
                                                            <div class="row-label col-xs-2"><%= Resources.Content.GN000114%>:</div>
                                                            <div class="col-xs-4">
                                                                <%# Eval("TotalCount") %>
                                                            </div>
                                                        </div>


                                                        <div class="row">
                                                            <div class="row-label col-xs-2"><%= Resources.Content.Syncing%>:</div>
                                                            <div class="col-xs-4">
                                                                <%# Eval("ActiveCount") %>
                                                            </div>
                                                            <div class="row-label col-xs-2"><%= Resources.Content.GN0000348%>:</div>
                                                            <div class="col-xs-4">
                                                                <%# Eval("PendingCount") %>
                                                            </div>
                                                        </div>

                                                        <div class="row">
                                                            <div class="row-label col-xs-2"><%= Resources.Content.DGN1110246%>:</div>
                                                            <div class="col-xs-4">
                                                                <%# Eval("FailedCount") %>
                                                            </div>
                                                            <div class="row-label col-xs-2"><%= Resources.Content.Synced%>:</div>
                                                            <div class="col-xs-4">
                                                                <%# Eval("SyncedCount") + Eval("FinalizedCount") %>
                                                            </div>
                                                        </div>

                                                    </div>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1" HeaderText='<%$ Resources:Content, GN00001320 %>'>
                                                <ItemTemplate>
                                                    <ul class="option-menu">
                                                        <li class="dropdown">
                                                            <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button"
                                                                aria-haspopup="true" aria-expanded="false">
                                                                <i class="material-icons">menu</i>
                                                            </a>
                                                            <ul class="dropdown-menu pull-right">
                                                                <li>
                                                                    <asp:HyperLink ID="HL_BatchMailboxes" CssClass="btnAction" runat="server" Text="<%$ Resources:Content, View%>" NavigateUrl='<%# String.Format("/RCC/Exchange/MailboxMigration.aspx?T=3&Batch={0}", Eval("BatchName"))  %>'></asp:HyperLink>
                                                                </li>
                                                                <li>
                                                                    <asp:LinkButton ID="Lbtn_AddSyncJob" CssClass="btnAction" runat="server" Text="<%$ Resources:Content, FAM00189 %>"
                                                                        CommandArgument='<%# Eval("BatchId")%>' CommandName="addsyncjob" Visible='<%# Eval("BatchStatus").ToString().ToLower().Equals("completed")%>'></asp:LinkButton>
                                                                </li>
                                                                <li>
                                                                    <asp:LinkButton ID="Lbtn_EditBatch" CssClass="btnAction" runat="server" Text="<%$ Resources:Content, Edit %>"
                                                                        CommandArgument='<%# Eval("BatchId")%>' CommandName="editbatch" Visible='<%# Not (Eval("BatchStatus").ToString().ToLower().Equals("stopped") OrElse Eval("BatchStatus").ToString().ToLower().Equals("completed") OrElse Eval("BatchStatus").ToString().ToLower().Equals("completedwitherrors") OrElse Eval("BatchStatus").ToString().ToLower().Equals("failed")) %>'></asp:LinkButton>
                                                                </li>
                                                                <li>
                                                                    <asp:LinkButton ID="Lbtn_UpdateBatch" CssClass="btnAction" runat="server" Text="<%$ Resources:Content, GN0000654 %>"
                                                                        CommandArgument='<%# Eval("BatchId")%>' CommandName="updatebatch" Visible='<%# Not (Eval("BatchStatus").ToString().ToLower().Equals("stopped") OrElse Eval("BatchStatus").ToString().ToLower().Equals("completed") OrElse Eval("BatchStatus").ToString().ToLower().Equals("completedwitherrors") OrElse Eval("BatchStatus").ToString().ToLower().Equals("failed")) %>'></asp:LinkButton>
                                                                </li>
                                                                <li>
                                                                    <asp:LinkButton ID="Lbtn_StartBatch" CssClass="btnAction" runat="server" Text="<%$ Resources:Content, GN0001173 %>"
                                                                        CommandArgument='<%# Eval("BatchId")%>' CommandName="startbatch" Visible='<%# Eval("BatchStatus").ToString().ToLower().Equals("stopped") %>'></asp:LinkButton>
                                                                </li>
                                                                <li>
                                                                    <asp:LinkButton ID="Lbtn_StopBatch" CssClass="btnAction" runat="server" Text="<%$ Resources:Content, GN0001174 %>"
                                                                        CommandArgument='<%# Eval("BatchId")%>' CommandName="stopbatch" Visible='<%# Not (Eval("BatchStatus").ToString().ToLower().Equals("stopped") OrElse Eval("BatchStatus").ToString().ToLower().Equals("completed") OrElse Eval("BatchStatus").ToString().ToLower().Equals("completedwitherrors") OrElse Eval("BatchStatus").ToString().ToLower().Equals("failed")) %>'></asp:LinkButton>
                                                                </li>
                                                                <li>
                                                                    <asp:LinkButton ID="IB_Delete" CssClass="btnAction" Text="<%$ Resources:Content,GN0000377%>"
                                                                        CommandArgument='<%#Eval("BatchId")%>' CommandName="removebatch" runat="server" Visible='<%# Eval("BatchStatus").ToString().ToLower().Equals("completed") OrElse Eval("BatchStatus").ToString().ToLower().Equals("completedwitherrors") OrElse Eval("BatchStatus").ToString().ToLower().Equals("failed") %>' />
                                                                </li>
                                                                <ajax:ConfirmButtonExtender ID="CBE_Remove" runat="server" TargetControlID="IB_Delete" ConfirmText='<%# Resources.Content.ConfirmAction.Replace("%action-text%",Eval("BatchName")) %>'></ajax:ConfirmButtonExtender>
                                                            </ul>
                                                        </li>
                                                    </ul>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>

                                        <%--PagerTemplate Start--%>
                                        <PagerTemplate>
                                            <UC:Pager ID="Pager1" runat="server" />
                                        </PagerTemplate>
                                        <%--PagerTemplate End--%>
                                    </asp:GridView>

                                </asp:Panel>
                                <asp:Panel ID="Pnl_BatchDetail" runat="server">
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <div class="card">
                                                <div class="header">
                                                    <h3>
                                                        <%= Resources.Content.BatchDetails %>                           
                                                    </h3>
                                                </div>
                                                <div class="body">

                                                    <div class="row" id="div_select_batch_endpoint" runat="server">
                                                        <div class="col-md-3 col-xs-12 row-label">
                                                            *
															<asp:Literal ID="Ltrl_SelectEndpoint" runat="server" Text="<%$ Resources:Content, SelectEndpoint %>" />:
                                                        </div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <asp:DropDownList ID="Ddl_Endpoints" runat="server" AutoPostBack="true"></asp:DropDownList>
                                                        </div>
                                                    </div>

                                                    <div class="row m-t-5 m-b-10">
                                                        <div class="col-md-3 col-xs-12 row-label">
                                                            <asp:Literal ID="Ltrl_TargetOrganization" runat="server" Text="<%$ Resources:Content, TargetOrganization %>" />:
                                                        </div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <asp:Label ID="Lbl_TargetOrganization" runat="server" />
                                                        </div>
                                                    </div>

                                                    <div class="row m-t-5 m-b-5">
                                                        <div class="col-md-3 col-xs-12 row-label">
                                                            <asp:Literal ID="Ltrl_BatchDomainTitle" runat="server" Text="<%$ Resources:Content, GN0000653 %>" />:
                                                        </div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <asp:Label ID="Lbl_Domain" runat="server" />
                                                        </div>
                                                    </div>

                                                    <div class="row">
                                                        <div class="col-md-3 col-xs-12 row-label">
                                                            *
                                                            <asp:Literal ID="Ltrl_BatchName" runat="server" Text="<%$ Resources:Content,BatchName%>" />:
                                                        </div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBx_BatchName" runat="server" MaxLength="100" />
                                                                </div>
                                                                <asp:RequiredFieldValidator ID="RFV_BatchName" runat="server" ControlToValidate="TxBx_BatchName"
                                                                    SetFocusOnError="true" ValidationGroup="batchdetail" Display="None"></asp:RequiredFieldValidator>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="row" id="div_select_batch_users" runat="server">
                                                        <div class="col-xs-12 row-label">
                                                            *
                                                                <asp:Literal ID="Ltrl_SelectUsers" runat="server" Text="<%$ Resources:Content, SelectUser %>" />:
                                                        </div>
                                                        <div class="col-xs-12">
                                                            <UC:AddSelectableSelected ID="UC_SelectUsers" runat="server" IsSelectedRequired="true" ValidationGroup="batchdetail" ClientSideOptimized="true" />
                                                        </div>
                                                    </div>

                                                    <div class="row">
                                                        <div class="col-md-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Ltrl_BadItemsLimit" runat="server" Text="<%$ Resources:Content, strBadItemsLimit %>" />:
                                                            </label>
                                                        </div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBx_BadItemsLimit" MaxLength="9" runat="server" Text="0"></asp:TextBox>
                                                                    <ajax:FilteredTextBoxExtender ID="FTE_BadItemsLimit" runat="server"
                                                                        FilterType="Numbers" TargetControlID="TxBx_BadItemsLimit">
                                                                    </ajax:FilteredTextBoxExtender>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="row">
                                                        <div class="col-md-3 col-xs-12 row-label">
                                                            <label>
                                                                <asp:Literal ID="Ltrl_LargeItemsLimit" runat="server"
                                                                    Text="<%$ Resources:Content, strLargeItemsLimit %>" />:
                                                            </label>
                                                        </div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <div class="form-group">
                                                                <div class="form-line">
                                                                    <asp:TextBox ID="TxBx_LargeItemsLimit" MaxLength="9" runat="server" Text="0"></asp:TextBox>
                                                                    <ajax:FilteredTextBoxExtender ID="FTE_LargeItemsLimit" runat="server"
                                                                        FilterType="Numbers" TargetControlID="TxBx_LargeItemsLimit">
                                                                    </ajax:FilteredTextBoxExtender>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="row" id="div_batch_notification_email_to" runat="server">
                                                        <div class="col-md-3 col-xs-12 row-label">
                                                            <asp:Literal ID="Ltrl_NotificationEmailTo" runat="server" Text="<%$ Resources:Content,SendReportOnBatchCompleteTo %>" />:
                                                        </div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <asp:TextBox ID="TxBx_NotificationEmailTo" runat="server" TextMode="MultiLine" Columns="8" Rows="4"></asp:TextBox>
                                                            &nbsp;
                                                            <br />
                                                            <b><%= Resources.Content.String597 %></b>
                                                        </div>
                                                    </div>
                                                    <div class="row" id="div_batch_auto_start" runat="server">
                                                        <div class="col-md-3 col-xs-12 row-label">
                                                            <asp:Literal ID="Ltrl_AutoStartBatchTitle" runat="server" Text="<%$ Resources:Content,strAutoStartBatchInstantly %>" />:
                                                        </div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <asp:CheckBox ID="CB_AutoStartBatch" runat="server" Text=" " Checked="true" onClick="showHideScheduleDetail(this,event)" />
                                                        </div>
                                                    </div>
                                                    <div id="div_schedule_detail" class="hide" runat="server">
                                                        <div class="row">
                                                            <div class="col-md-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="Literal55" runat="server" Text="<%$ Resources:Content,GN00001547 %>" />:
                                                                </label>
                                                            </div>
                                                            <div class="col-md-2 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_ExecutionDate" runat="server" onkeydown='event.preventDefault();' Style="width: 200px">
                                                                        </asp:TextBox>
                                                                        <ajax:CalendarExtender ID="CE_ExecutionDate" runat="server" TargetControlID="TxBx_ExecutionDate"
                                                                            CssClass="date__calendar" OnClientDateSelectionChanged="checkDate">
                                                                        </ajax:CalendarExtender>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-md-offset-3 col-md-6 hidden-xs">
                                                                <span style='width: 39%;' class="display-inline-float-left">
                                                                    <asp:Label ID="Ltrl_ExecutionHour" runat="server" Text="<%$ Resources:Content,strHours %>" CssClass="pull-left"></asp:Label>
                                                                </span>
                                                                <span style="width: 20px; height: 10px;" class="display-inline-float-left"></span>
                                                                <span style='width: 39%;' class="display-inline-float-left">
                                                                    <asp:Label ID="Label1" runat="server" Text="<%$ Resources:Content,strMinutes %>" CssClass="pull-left"></asp:Label>
                                                                </span>
                                                            </div>
                                                            <div class="col-md-2 hidden-xs" style="min-height: 20px"></div>

                                                            <div class="col-md-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:Content,OCS017 %>" />:
                                                                </label>
                                                            </div>
                                                            <div class="col-md-6 col-xs-12">
                                                                <div class="form-group">
                                                                    <span style='width: 35%;' class="display-inline-float-left">

                                                                        <span class="display-inline-float-left">
                                                                            <asp:TextBox ID="TxBx_ExecutionHour" runat="server" onkeydown='event.preventDefault();'>
                                                                            </asp:TextBox>
                                                                        </span>
                                                                    </span>
                                                                    <span class="numeric-updown-icon-wrapper">

                                                                        <a id="execution_hour_up" runat="server">
                                                                            <i class="glyphicon glyphicon-triangle-top"></i>
                                                                        </a>
                                                                        <span class="clearfix"></span>
                                                                        <a id="execution_hour_down" runat="server">
                                                                            <i class="glyphicon glyphicon-triangle-bottom"></i>
                                                                        </a>
                                                                    </span>
                                                                    <ajax:NumericUpDownExtender ID="NUD_ExecutionHour" runat="server" TargetControlID="TxBx_ExecutionHour"
                                                                        Step="1" RefValues="00;01;02;03;04;05;06;07;08;09;10;11;12;13;14;15;16;17;18;19;20;21;22;23" Width="75" TargetButtonUpID="execution_hour_up" TargetButtonDownID="execution_hour_down">
                                                                    </ajax:NumericUpDownExtender>
                                                                </div>
                                                                <span style="width: 20px; height: 10px;" class="display-inline-float-left"></span>
                                                                <div class="form-group">
                                                                    <span style='width: 35%;' class="display-inline-float-left m-t--5">
                                                                        <span class="display-inline-float-left">
                                                                            <asp:TextBox ID="TxBx_ExecutionMin" runat="server" Text="15" onkeydown='event.preventDefault();' onChange="checkMin(this,event)">
                                                                            </asp:TextBox>
                                                                        </span>
                                                                    </span>
                                                                    <span class="numeric-updown-icon-wrapper m-t--5">

                                                                        <a id="execution_Min_up" runat="server">
                                                                            <i class="glyphicon glyphicon-triangle-top"></i>
                                                                        </a>
                                                                        <span class="clearfix"></span>
                                                                        <a id="execution_Min_down" runat="server">
                                                                            <i class="glyphicon glyphicon-triangle-bottom"></i>
                                                                        </a>
                                                                    </span>
                                                                    <ajax:NumericUpDownExtender ID="NUD_ExecutionMin" runat="server" TargetControlID="TxBx_ExecutionMin"
                                                                        Step="15" Width="75" TargetButtonUpID="execution_Min_up" TargetButtonDownID="execution_Min_down">
                                                                    </ajax:NumericUpDownExtender>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="row">
                                                        <div class="col-md-3 col-xs-12"></div>
                                                        <div class="col-md-6 col-xs-12">
                                                            <asp:Button ID="Btn_CreateBatch" runat="server" Text="<%$ Resources:Content,Save%>" CausesValidation="true"
                                                                ValidationGroup="batchdetail" class="btn btn-primary waves-effect btnAction" />
                                                            &nbsp;
                                                            <asp:Button ID="Btn_CancelCreateBatch" runat="server" Text="<% $ Resources:Content,Cancel %>"
                                                                CausesValidation="false" class="btn btn-primary waves-effect" />
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </asp:Panel>
                                <asp:Panel ID="Pnl_CreateBatchLogDetails" runat="server" Visible="false">
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <div class="card">
                                                <div class="header">
                                                    <h3>
                                                        <%= Resources.Content.GN00001320 %> <%= Resources.Content.Dev675 %>                           
                                                    </h3>
                                                </div>
                                                <div class="body">
                                                    <div class="row">
                                                        <div class="col-xs-12">
                                                            <div id="div_createbatchlog" runat="server" style="max-height: 450px; overflow-y: scroll">
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-md-offset-11 col-sm-offset-8  col-md-1 col-sm-4 col-xs-12">
                                                            <asp:Button ID="Btn_CloseLogDetails" runat="server" Text="<%$ Resources:Content,GN000150 %>" class="btn btn-primary waves-effect" />
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </asp:Panel>
                            </asp:Panel>
                        </ContentTemplate>
                    </ajax:TabPanel>

                    <ajax:TabPanel ID="Tab_MigrationMailboxes" runat="server" HeaderText='<%$ Resources:Content, MailboxMigration %>'>
                        <ContentTemplate>
                            <asp:Button ID="Btn_Tab3" runat="server" Style="display: none" />
                            <asp:Panel ID="Pnl_TabContent3" runat="server" Visible="false">
                                <asp:Panel ID="Pnl_MigrationMailboxesListing" runat="server" DefaultButton="Btn_SearchMigrationUserDetails">
                                    <div class="row">
                                        <div class="panel-group search-panel" id="pg-MigrationMailboxes" role="tablist" aria-multiselectable="true">
                                            <div class="col-xs-12" role="tab" id="tab-MigrationMailboxes">
                                                <div class="card">
                                                    <div class="header" role="button" data-toggle="collapse" data-parent="#pg-MigrationMailboxes" href="#<%= SB_MigrationMailboxes.ClientID%>" aria-expanded="true" aria-controls="tab-MigrationMailboxes">
                                                        <h3>
                                                            <%= Resources.Content.GN0000395%>
                                                        </h3>
                                                    </div>
                                                    <div id="SB_MigrationMailboxes" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="tab-MigrationMailboxes" aria-expanded="false">
                                                        <div class="row">

                                                            <div class="col-md-4 col-sm-6 col-xs-12">
                                                                <div class="form-group form-float">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_SearchMigrationOrg" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Lbl_SearchMigrationOrg" runat="server" EnableViewState="false" Text="<%$ Resources:Content,strOrganization%>" class="form-label"></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-4 col-sm-6 col-xs-12">
                                                                <div class="form-group form-float">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_SearchMigrationDomain" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Lbl_SearchMigrationDomain" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000653%>" class="form-label"></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-4 col-sm-6 col-xs-12">
                                                                <div class="form-group form-float">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_SearchMigrationBatch" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Lbl_SearchMigrationBatch" runat="server" EnableViewState="false" Text="<%$ Resources:Content,strBatch %>" class="form-label"></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-4 col-sm-6 col-xs-12">
                                                                <div class="form-group form-float">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_SearchMigrationUser" runat="server"></asp:TextBox>
                                                                        <asp:Label ID="Lbl_SearchMigrationUser" runat="server" EnableViewState="false" Text="<%$ Resources:Content,User %>" class="form-label"></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-4 col-sm-6 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:DropDownList ID="Ddl_SearchMigrationServer" runat="server"></asp:DropDownList>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-4 col-sm-6 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:DropDownList ID="Ddl_SearchMigrationUserStatus" runat="server">
                                                                        <asp:ListItem Text="--All---" Value=""></asp:ListItem>
                                                                        <asp:ListItem Text="Completed" Value="Completed"></asp:ListItem>
                                                                        <asp:ListItem Text="CompletedWithWarnings" Value="CompletedWithWarnings"></asp:ListItem>
                                                                        <asp:ListItem Text="Completing" Value="Completing"></asp:ListItem>
                                                                        <asp:ListItem Text="CompletionFailed" Value="CompletionFailed"></asp:ListItem>
                                                                        <asp:ListItem Text="CompletionSynced" Value="CompletionSynced"></asp:ListItem>
                                                                        <asp:ListItem Text="Corrupted" Value="Corrupted"></asp:ListItem>
                                                                        <asp:ListItem Text="Failed" Value="Failed"></asp:ListItem>
                                                                        <asp:ListItem Text="IncrementalFailed" Value="IncrementalFailed"></asp:ListItem>
                                                                        <asp:ListItem Text="IncrementalStopped" Value="IncrementalStopped"></asp:ListItem>
                                                                        <asp:ListItem Text="IncrementalSynced" Value="IncrementalSynced"></asp:ListItem>
                                                                        <asp:ListItem Text="IncrementalSyncing" Value="IncrementalSyncing"></asp:ListItem>
                                                                        <asp:ListItem Text="Provisioning" Value="Provisioning"></asp:ListItem>
                                                                        <asp:ListItem Text="ProvisionUpdating" Value="ProvisionUpdating"></asp:ListItem>
                                                                        <asp:ListItem Text="Queued" Value="Queued"></asp:ListItem>
                                                                        <asp:ListItem Text="Removing" Value="Removing"></asp:ListItem>
                                                                        <asp:ListItem Text="Starting" Value="Starting"></asp:ListItem>
                                                                        <asp:ListItem Text="Stopped" Value="Stopped"></asp:ListItem>
                                                                        <asp:ListItem Text="Stopping" Value="Stopping"></asp:ListItem>
                                                                        <asp:ListItem Text="Synced" Value="Synced"></asp:ListItem>
                                                                        <asp:ListItem Text="Syncing" Value="Syncing"></asp:ListItem>
                                                                        <asp:ListItem Text="Validating" Value="Validating"></asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </div>
                                                            </div>


                                                            <div class="col-md-4 col-sm-6 col-xs-12">
                                                                <div class="form-group form-float">
                                                                    <asp:Button ID="Btn_SearchMigrationUserDetails" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000391%>" />
                                                                    <asp:Button ID="Btn_SearchClearMigrationUserDetails" Visible="false" class="btn btn-primary waves-effect" runat="server"
                                                                        Text="<%$ Resources:Content,String289 %>" />
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <asp:GridView ID="GV_MigrationMailboxes" runat="server" CssClass="table table-bordered table-striped table-hover"
                                                EmptyDataText="<%$ Resources:Content,GN00001375%>" AutoGenerateColumns="false" DataKeyNames="MailboxIdentifier,TotalItemsInSourceMailboxCount, SyncedItemCount,SkippedItemCount, Status,TotalQueuedDuration, TotalInProgressDuration, TotalSyncedDuration,
Error, BytesTransferred, AverageBytesTransferredPerHour,PercentageComplete,ErrorSummary"
                                                AllowPaging="true">

                                                <Columns>
                                                    <%--<asp:TemplateField HeaderText='<%$ Resources:Content,USM0191%>' HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                                        <ItemTemplate>
                                                            <asp:Literal ID="Ltrl_User" runat="server" Text='<%# String.Format("{0} [{1}]",Eval("DisplayName"), Eval("UPName")) %>'></asp:Literal>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>--%>
                                                    <asp:TemplateField HeaderText="<%$ Resources:Content,strBatch %>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                                        <ItemTemplate>
                                                            <asp:Literal ID="Ltrl_BatchName" runat="server" Text='<%# Eval("BatchName") %>'></asp:Literal>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="<%$ Resources:Content,strOrganization %>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                                        <ItemTemplate>
                                                            <asp:Literal ID="Ltrl_Organization" runat="server" Text='<%# Eval("OrganizationName") %>'></asp:Literal>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="<%$ Resources:Content,GN0000653 %>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                                        <ItemTemplate>
                                                            <asp:Literal ID="Ltrl_Domain" runat="server" Text='<%# Eval("EndpointDomain") %>'></asp:Literal>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <%--<asp:TemplateField HeaderText="<%$ Resources:Content,Status %>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                                        <ItemTemplate>
                                                            <asp:Literal ID="Ltrl_Status" runat="server" Text='<%# Eval("Status") %>'></asp:Literal>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>--%>
                                                    <asp:TemplateField HeaderText="<%$ Resources:Content,USM0191 %>" HeaderStyle-CssClass="col-xs-6" ItemStyle-CssClass="col-xs-6">
                                                        <ItemTemplate>
                                                            <table class="table small">
                                                                <tr>
                                                                    <td class="row-label col-xs-2"><%= Resources.Content.USM0191%>:</td>
                                                                    <td class="col-xs-4">
                                                                        <%# String.Format("{0} [{1}]",Eval("DisplayName"), Eval("UPName")) %>
                                                                    </td>
                                                                    <td class="row-label col-xs-2"><%= Resources.Content.Status%>:</td>
                                                                    <td class="col-xs-4">
                                                                        <%# Eval("Status") %>
                                                                    </td>
                                                                </tr>

                                                                <tr>
                                                                    <td class="row-label col-xs-2"><%= Resources.Content.Completed%>:</td>
                                                                    <td class="col-xs-4">
                                                                        <%# Eval("PercentageComplete") %>%
                                                                    </td>
                                                                    <td class="row-label col-xs-2"><%= Resources.Content.StrBytesTransferred%>:</td>
                                                                    <td class="col-xs-4">
                                                                        <%# Eval("BytesTransferred") %>
                                                                    </td>
                                                                </tr>

                                                                <tr>
                                                                    <td class="row-label col-xs-2"><%= Resources.Content.Synced%>:</td>
                                                                    <td class="col-xs-4">
                                                                        <%# Eval("SyncedItemCount") %> / <%# Eval("TotalItemsInSourceMailboxCount") %>
                                                                    </td>
                                                                    <td class="row-label col-xs-2"><%= Resources.Content.strSkipped%>:</td>
                                                                    <td class="col-xs-4">
                                                                        <%# Eval("SkippedItemCount") %>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td class="row-label col-xs-4"><%= Resources.Content.GN0000835%>:</td>
                                                                    <td colspan="3" class="col-xs-8">
                                                                        <span class="errorMsg"><%# Eval("ErrorSummary") %></span>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <%--PagerTemplate Start--%>
                                                <PagerTemplate>
                                                    <UC:Pager ID="Pager1" runat="server" />
                                                </PagerTemplate>
                                                <%--PagerTemplate End--%>
                                            </asp:GridView>
                                        </div>
                                    </div>

                                </asp:Panel>

                            </asp:Panel>
                        </ContentTemplate>
                    </ajax:TabPanel>
                </ajax:TabContainer>
            </div>
        </div>
    </div>
    <style type="text/css">
        .display-inline-float-left,
        .numeric-updown-icon-wrapper {
            display: inline-block;
            float: left;
        }

        .numeric-updown-icon-wrapper {
            margin-right: 5px;
            margin-left: 2px;
        }
    </style>

    <script lang="javascript" type="text/javascript">
        $(function () {
            var cbIsDelayed = $get('<%= CB_AutoStartBatch.ClientID%>');
            if (cbIsDelayed)
                if (!cbIsDelayed.checked)
                    $("[id$='div_schedule_detail']").removeClass('hide');
        });

        function showHideScheduleDetail(source, e) {
            if (source.checked)
                $("[id$='div_schedule_detail']").addClass('hide');
            else
                $("[id$='div_schedule_detail']").removeClass('hide');
        }

        function checkMin(source, e) {
            if (source.value > 60 || source.value < 0)
                source.value = '00';
            else if (source.value == 60)
                source.value = 59
            else if (source.value % 15 != 0 && source.value != 59)
                source.value = parseInt(source.value) + 1;
        }
        function checkDate(sender, args) {
            if (sender._selectedDate < new Date()) {
                sender._selectedDate = new Date();
                // set the date back to the current date
                sender._element.value = sender._selectedDate.format(sender._format);
            }
            setTimeout(function () { sender.hide(); }, 1000);
        }
    </script>
</asp:Content>

