<%@ control language="VB" autoeventwireup="false" inherits="Admin_Hostmatic_CC_Databases, MachSol.MachPanel.Web" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Src="~/Template/ResourcesQuota.ascx" TagName='ResourceQuota' TagPrefix='EM' %>
<%@ Register Src="~/Template/LargeFileUpload.ascx" TagName="LFU" TagPrefix="UC" %>
<%@ Register Src="~/Template/CC/Selectable_Selected_LBX.ascx" TagName="AddSelectableSelected" TagPrefix="EM" %>

<script language="javascript" type="text/javascript">
    //To fix Uncaught TypeError: Cannot read property '_notified' of null ScriptResource.axd?d= :3546
    Sys.Browser.WebKit = {}; //Safari 3 is considered WebKit
    if (navigator.userAgent.indexOf('WebKit/') > -1) {
        Sys.Browser.agent = Sys.Browser.WebKit;
        Sys.Browser.agent = Sys.Browser.WebKit;
        Sys.Browser.version = parseFloat(navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);
        Sys.Browser.name = 'WebKit';
    }
</script>

<div class="col-xs-12">
    <div class="card">
        <div class="header">
            <div class="displayInlineBlock">
                <h2>
                    <asp:Literal ID="Ltl_SubsInfo" runat="server" /></h2>
            </div>
            <asp:LinkButton ID="Btn_GoBack" runat="server" Text="<%$ Resources:Content,String1045 %>" CausesValidation="false"
                CssClass="btn btn-primary waves-effect pull-right m-t--4px" />
        </div>
        <div class="body">
            <div class="row">
                <div class="col-xs-12">
                    <div class="products-step">
                        <span id="div_s1" runat="server" nowrap="true" class="label label-success">
                            <asp:LinkButton ID="LB_Databases" runat="server" Text='<%$ Resources:Content,String49%>' />
                        </span>
                        <span id="div_s2" runat="server" nowrap="true" class="label label-default">
                            <asp:LinkButton ID="LB_DatabaseUsers" runat="server" Text='<%$ Resources:Content,SMI0434%>' />
                        </span>
                        <span id="div_s3" runat="server" nowrap="true" class="label label-default" style="display: none;">
                            <%--<asp:LinkButton ID="LinkButton1" runat="server" Text='Database Users' />--%>
                        </span>
                    </div>
                </div>

                <div class="col-xs-12">
                    <%--Databases tab--%>
                    <div id="Pnl_Databases" runat="server">
                        <div class="row" id="Pnl_Grid" runat="server" visible="true">
                            <%--Search Option--%>
                            <asp:Panel ID="Pnl_FilterDB" runat="server" DefaultButton="Btn_SrchDB">
                                <div class="panel-group search-panel" id="AS_Database" role="tablist" aria-multiselectable="true">
                                    <div class="col-xs-12" role="tab" id="SH_Database">
                                        <div class="card">
                                            <div class="header" role="button" data-toggle="collapse" data-parent="#AS_Database" href="#<%= CSB_Database.ClientID%>" aria-expanded="true" aria-controls="SH_Database">
                                                <h3>
                                                    <%= Resources.Content.GN0000395%>
                                                </h3>
                                            </div>
                                            <div id="CSB_Database" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_Database" aria-expanded="false">
                                                <div class="row">
                                                    <%--<div class="col-md-3 col-sm-6 col-xs-12" runat="server" id="td_Owner">
                                                                        <div class="form-group form-float">
                                                                            <asp:DropDownList ID="DDL_Owner" runat="server" onchange="setOwnerCookie(this)"></asp:DropDownList>
                                                                        </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_DatabaseName" runat="server"></asp:TextBox>
                                                                <asp:Label ID="Label7" runat="server" EnableViewState="false" Text="<%$ Resources:Content,SPT002073%>" class="form-label"></asp:Label>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="col-xs-12">
                                                        <div class="form-group form-float">
                                                            <asp:Button ID="Btn_SrchDB" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000391%>" />
                                                            <asp:Button ID="Btn_ClearDB" Visible="false" class="btn btn-primary waves-effect" runat="server"
                                                                Text="<%$ Resources:Content,String289 %>" />
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>

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

                            <div class="col-xs-12">
                                <asp:GridView ID="GV_Databases" runat="server" AllowPaging="true" DataSourceID=""
                                    CssClass="table table-bordered table-striped table-hover" AutoGenerateColumns="false" EmptyDataText="<%$ Resources:Content,GN00001375%>">

                                    <Columns>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,GN000170%>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_Name" runat="server"></asp:Label>
                                                <div id="Div_LinkedOrgName" runat="server" visible="false"></div>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,SPT002274%>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_DBServer" runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,DGN1110096%>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_Provider" runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,AvailabilityGroupName%>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_AvailabilityGroupName" runat="server"></asp:Label>
                                                <asp:LinkButton ID="LB_AGStatus" runat="server" CommandName="AGStatus" Visible="false"></asp:LinkButton>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,GN00001320%>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="LB_Manage" runat="server" CssClass="btn btn-primary waves-effect" CommandName="DBEdit"
                                                    Text="<%$ Resources:Content,L0086%>" CausesValidation="false"></asp:LinkButton>
                                                <asp:LinkButton ID="LB_Remove" runat="server" CssClass="btn btn-primary waves-effect btnAction" CommandName="DBRemove"
                                                    Text='<%$ Resources:Content, GN0000278 %>' CausesValidation="false"></asp:LinkButton>
                                                <EM:ConfirmButtonExtender ID="CBE_Remove" runat="server" ConfirmText="<%$Resources:Content,CBE001%>"
                                                    TargetControlID="LB_Remove">
                                                </EM:ConfirmButtonExtender>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <%--PagerTemplate Start--%>
                                    <PagerTemplate>
                                        <EM:Pager ID="Pager1" runat="server" />
                                    </PagerTemplate>
                                    <%--PagerTemplate End--%>
                                </asp:GridView>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-xs-12">
                                <%--Add databases--%>
                                <div class="card" id="FS_AddDB" runat="server" visible="false">
                                    <div class="header">
                                        <h3><%= Resources.Content.SPT002083%></h3>
                                    </div>
                                    <div class="body">
                                        <div id="Div_ProviderDDL" runat="server">
                                            <div class="row">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <label>
                                                        <asp:Literal ID="Literal19" runat="server" Text="<%$ Resources:Content,DGN1110096%>"
                                                            EnableViewState="false" />:</label>
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <asp:DropDownList ID="DDL_Provider" AutoPostBack="true" runat="server" />
                                                    </div>
                                                </div>
                                            </div>
                                            <%--<div class="row">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <label>
                                                        <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Content,Lync355%>"
                                                            EnableViewState="false" />:</label>
                                                </div>
                                                <div class="col-sm-4 col-xs-12" id="Div_ProviderName" runat="server">
                                                </div>
                                            </div>--%>
                                        </div>

                                        <div class="row" id="Div_HostedOrg" runat="server" visible="false">
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <label>
                                                    <asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:Content,LinkedHostedOrg%>"
                                                        EnableViewState="false" />:</label>
                                            </div>
                                            <div class="col-sm-4 col-xs-12">
                                                <div class="form-group">
                                                    <asp:DropDownList ID="DDL_HostedOrg" runat="server" AutoPostBack="true" />
                                                </div>
                                            </div>
                                        </div>

                                        <div class="row">
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <label>
                                                    *<asp:Literal ID="Literal17" runat="server" Text="<%$ Resources:Content,SPT002073%>"
                                                        EnableViewState="false" />:</label>
                                                <br />
                                                <small>
                                                    <asp:Literal ID="Ltl_DataBaseNameHelp" runat="server" Text="<%$ Resources:Content,SMI0430%>"> </asp:Literal></small>
                                            </div>
                                            <div class="col-sm-4 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_DBName" runat="server" MaxLength="100"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="RFV_TxBx_DBName" runat="server" ControlToValidate="TxBx_DBName"
                                                            Display="None" ValidationGroup="DataBases" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator ID="REV_TxBx_DBName" runat="server" ControlToValidate="TxBx_DBName"
                                                            Display="None" ValidationGroup="DataBases" SetFocusOnError="True" ErrorMessage="<%$ Resources:Content,strInvalidName %>"
                                                            ValidationExpression="^(?=.*[a-zA-Z0-9])[a-zA-Z0-9](?!.*[_\s\-]$)(?!.*^[_\s\-])[a-zA-Z0-9_\s\-]{4,125}[a-zA-Z0-9]$"></asp:RegularExpressionValidator>
                                                        <EM:FilteredTextBoxExtender ID="FTE_TxBx_DBName" runat="server" TargetControlID="TxBx_DBName"
                                                            FilterType="Numbers,UppercaseLetters,LowercaseLetters,Custom" ValidChars="_- " />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="row" id="Div_DBUserType" runat="server" visible="false">
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <label>
                                                    <asp:Literal ID="Literal25" runat="server" Text="<%$ Resources:Content,UserType%>"
                                                        EnableViewState="false" />:</label>
                                            </div>
                                            <div class="col-sm-4 col-xs-12">
                                                <div class="form-group">
                                                    <asp:DropDownList ID="DDL_DBUserType" runat="server" AutoPostBack="true">
                                                        <asp:ListItem Text="<%$ Resources:Content,SM0104 %>" Value="0"></asp:ListItem>
                                                        <asp:ListItem Text="<%$ Resources:Content,SQLUser %>" Value="1"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                        </div>

                                        <div id="Div_SQLUserAdd" runat="server">
                                            <div class="row">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <label>
                                                        *<asp:Literal ID="Literal10" runat="server" Text="<%$ Resources:Content,SMI071%>"
                                                            EnableViewState="false" />:</label>
                                                    <br />
                                                    <small>
                                                        <asp:Literal ID="Ltl_DBUserNameHelp" runat="server" Text="<%$ Resources:Content,SMI0430%>"></asp:Literal></small>
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <div class="form-line">
                                                            <asp:TextBox ID="TxBx_UName" MaxLength="100" runat="server"></asp:TextBox>
                                                            <asp:RequiredFieldValidator ID="RFV_TxBx_UName" runat="server" ControlToValidate="TxBx_UName"
                                                                Display="None" ValidationGroup="DataBases" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                            <%--<EM:FilteredTextBoxExtender ID="FTE_TxBx_UName" runat="server" TargetControlID="TxBx_UName"
                                FilterType="Numbers,UppercaseLetters,LowercaseLetters,Custom" ValidChars="_-@" />--%>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-sm-5 col-xs-12">
                                                    <asp:CheckBox ID="CB_MYSQLUserHelp" runat="server" Text="<%$ Resources:Content,SMI0431%>"
                                                        Checked="true" Visible="false"></asp:CheckBox>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <label>
                                                        *<asp:Literal ID="Literal14" runat="server" Text="<%$ Resources:Content,GN0000569%>"
                                                            EnableViewState="false" />:</label>
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <div class="form-line">
                                                            <asp:TextBox ID="TxBx_Pass" MaxLength="24" runat="server" TextMode="Password"></asp:TextBox>
                                                            <asp:RegularExpressionValidator ID="REV_TxBx_DBPassword" runat="server" ErrorMessage='Invalid Password.'
                                                                ControlToValidate="TxBx_Pass" Display="None" ValidationExpression="^.*(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$"
                                                                ValidationGroup="DataBases"></asp:RegularExpressionValidator>
                                                            <asp:RequiredFieldValidator ID="RFV_TxBx_Pass" runat="server" ControlToValidate="TxBx_Pass"
                                                                Display="None" ValidationGroup="DataBases"></asp:RequiredFieldValidator>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-sm-5 col-xs-12">
                                                    <asp:Label ID="Lbl_PasswordPolicy" runat="server" EnableViewState="false"
                                                        Text="<%$ Resources:Content,L00135%>"></asp:Label>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <label>
                                                        *<asp:Literal ID="Literal16" runat="server" Text="<%$ Resources:Content,GN0001196%>"
                                                            EnableViewState="false" />:</label>
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <div class="form-line">
                                                            <asp:TextBox ID="TxBx_ConPass" runat="server" MaxLength="24" TextMode="Password"></asp:TextBox>
                                                            <asp:RequiredFieldValidator ID="RFV_TxBx_ConPass" runat="server" ControlToValidate="TxBx_ConPass"
                                                                Display="None" ValidationGroup="DataBases"></asp:RequiredFieldValidator>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <label>
                                                        *<asp:Literal ID="Literal34" runat="server" Text="<%$ Resources:Content,UpdatePasswordIfUserExists%>"
                                                            EnableViewState="false" />:</label>
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <asp:CheckBox ID="ChBx_UpdatePasswordIfUserExists" runat="server" Text=" " />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="row" id="Div_ADUsersAdd" runat="server" visible="false">
                                            <div class="col-xs-12 row-label">
                                                <asp:Literal ID="Literal23" runat="server" Text="<%$ Resources:Content,strSelectADUser%>"
                                                    EnableViewState="false" />:
                                            </div>

                                            <div class="col-xs-12">
                                                <ajax:UpdatePanel ID="UP_ADUsers" runat="server">
                                                    <ContentTemplate>
                                                        <EM:AddSelectableSelected ID="UCADUsers" runat="server" />
                                                    </ContentTemplate>
                                                </ajax:UpdatePanel>
                                            </div>
                                        </div>

                                        <div class="row">
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <label>
                                                    *<asp:Literal ID="LB_DbSize" runat="server" Text="<%$ Resources:Content,DatabaseSizeInMB%>"
                                                        EnableViewState="false" />:</label>
                                            </div>
                                            <div class="col-sm-4 col-xs-12">
                                                <div class="form-group">
                                                    <asp:DropDownList ID="DDL_DbSize" runat="server" AutoPostBack="true" />
                                                </div>
                                            </div>
                                        </div>

                                        <div id="Div_MSSQLOnlyInputs" runat="server">
                                            <div class="row hide">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <label>
                                                        *<asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:Content,SPT002088%>"
                                                            EnableViewState="false" />:</label>
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <asp:DropDownList ID="DDL_DbSizeLDF" runat="server" />
                                                    </div>
                                                </div>
                                            </div>

                                            <%--<div class="row" ID="Div_AvailabilityGroup" runat="server">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <label>
                                                        *<asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Content,SelectAvailabilityGroup %>"
                                                            EnableViewState="false" />:</label>
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <asp:DropDownList ID="DDL_AvailabilityGroup" runat="server" AutoPostBack="true">
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                            </div>--%>

                                            <div class="row">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <label>
                                                        *<asp:Literal ID="Literal11" runat="server" Text="Collation"
                                                            EnableViewState="false" />:</label>
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <asp:DropDownList ID="DDL_Collations" runat="server" />
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="row">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <label>
                                                        *<asp:Literal ID="Literal13" runat="server" Text="<%$ Resources:Content,RecoveryModel %>"
                                                            EnableViewState="false" />:</label>
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <asp:DropDownList ID="DDL_RecoveryModel" runat="server">
                                                            <asp:ListItem Text="Full" Value="FULL"></asp:ListItem>
                                                            <asp:ListItem Text="BULK-LOGGED" Value="BULK_LOGGED"></asp:ListItem>
                                                            <asp:ListItem Text="SIMPLE" Value="SIMPLE"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="row">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <label>
                                                        *<asp:Literal ID="Literal18" runat="server" Text="<%$ Resources:Content,SMI0432%>"
                                                            EnableViewState="false" />:</label>
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <asp:CheckBoxList ID="ChBxL_NewRoles" runat="server" Width="100%" RepeatColumns="3" RepeatLayout="Table">
                                                            <asp:ListItem Text="public" Selected="True" Enabled="false" Value="1"></asp:ListItem>
                                                            <asp:ListItem Text="db_owner" Selected="True" Value="2"></asp:ListItem>
                                                        </asp:CheckBoxList>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="row">
                                            <div class="col-xs-12">
                                                <asp:ValidationSummary ID="VS_DataBases" runat="server" HeaderText='<%$ Resources:Content, EM000001 %>'
                                                    ShowMessageBox="True" ShowSummary="False" ValidationGroup="DataBases" />

                                                <asp:Button ID="Btn_DBSave" Text="<%$ Resources:Content,GN0000281%>" class="btn btn-primary waves-effect btnAction" runat="server" ValidationGroup="DataBases" />
                                                <asp:Button ID="Btn_DBCancel" Text="<%$ Resources:Content,GN0000572%>" class="btn btn-primary waves-effect" runat="server"
                                                    CausesValidation="false" />
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <%--Manage databases    --%>
                                <div class="card" id="Pnl_DBManage" runat="server" visible="false">
                                    <div class="body">
                                        <div class="row">
                                            <div class="col-xs-12" id="Div_DBName" runat="server">
                                            </div>
                                        </div>

                                        <%--General Settings --%>
                                        <div class="row">
                                            <div class="col-xs-12">
                                                <div class="card">
                                                    <div class="header">
                                                        <h3><%= Resources.Content.SM400028 %></h3>
                                                    </div>
                                                    <div class="body">
                                                        <div class="row" id="Div_LinkedADOrganization" runat="server" visible="false">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="Literal27" runat="server" Text="<%$ Resources:Content,LinkedHostedOrg%>" EnableViewState="false"></asp:Literal>:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <asp:HyperLink ID="LB_OrganizationName" runat="server"></asp:HyperLink>
                                                            </div>
                                                        </div>
                                                        <div class="row" id="Div_OnlyADUsersAllowed" runat="server" visible="false">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="Literal31" runat="server" Text="<%$ Resources:Content,OnlyADUsersAllowed%>" EnableViewState="false"></asp:Literal>:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12" id="Div_OnlyADUsersAllowedValue" runat="server">
                                                            </div>
                                                        </div>
                                                        <div class="row" id="Div_AvailabilityGroupName" runat="server" visible="false">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="Literal42" runat="server" Text="<%$ Resources:Content,AvailabilityGroupName%>" EnableViewState="false"></asp:Literal>:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <asp:Label ID="Lbl_AvailabilityGroupName" runat="server"></asp:Label>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="Literal26" runat="server" Text="Collation" EnableViewState="false"></asp:Literal>:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12" id="Div_Collation" runat="server">
                                                            </div>
                                                        </div>
                                                        <div class="row" id="Div_RecoveryModelDBManage" runat="server">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="Literal30" runat="server" Text="<%$ Resources:Content,RecoveryModel%>" EnableViewState="false"></asp:Literal>:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:DropDownList ID="DDL_RecoveryModelDBManage" runat="server">
                                                                        <asp:ListItem Text="Full" Value="FULL"></asp:ListItem>
                                                                        <asp:ListItem Text="BULK-LOGGED" Value="BULK_LOGGED"></asp:ListItem>
                                                                        <asp:ListItem Text="SIMPLE" Value="SIMPLE"></asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </div>
                                                            </div>
                                                            <div class="col-sm-5 col-xs-12">
                                                                <asp:Button ID="Btn_SaveRecoveryModelDBManage" Text="<%$ Resources:Content,GN0000281%>" class="btn btn-primary waves-effect btnAction" runat="server" CausesValidation="false" />
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <%--Database users management--%>
                                        <div class="row" id="Pnl_DBUsersList" runat="server" visible="false">
                                            <div class="col-xs-12">
                                                <div class="card">
                                                    <div class="header">
                                                        <h3><%= Resources.Content.GN0000636%></h3>
                                                    </div>
                                                    <div class="body">
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="Litrl1" runat="server" Text="<%$ Resources:Content,SMI0434%>" EnableViewState="false"></asp:Literal>:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:DropDownList ID="DDL_ListUsers" runat="server">
                                                                        <%--<asp:ListItem Text=".." Value="1"></asp:ListItem>--%>
                                                                    </asp:DropDownList>
                                                                </div>
                                                            </div>
                                                            <div class="col-sm-5 col-xs-12">
                                                                <asp:LinkButton class="btn btn-primary waves-effect btnAction" ID="LBtn_Assign" runat="server" Visible="false" CausesValidation="false">Assign user to database</asp:LinkButton>
                                                                <asp:LinkButton class="btn btn-primary waves-effect btnAction" ID="LBtn_AddNewUser" runat="server" CausesValidation="false">Add new user</asp:LinkButton>
                                                                <asp:LinkButton class="btn btn-primary waves-effect btnAction" ID="LBtn_Removeuser" runat="server" CausesValidation="false">Remove selected user</asp:LinkButton>
                                                            </div>
                                                        </div>
                                                        <div class="row hide">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>
                                                                    <asp:Literal ID="litrlRole" runat="server" Text="<%$ Resources:Content,USM0079%>" EnableViewState="false"></asp:Literal>:</label>
                                                            </div>
                                                            <div class="col-xs-4 col-sm-12">
                                                                <asp:CheckBoxList ID="ChBxL_DBRoles" runat="server" Width="100%" RepeatColumns="3" RepeatLayout="Table">
                                                                </asp:CheckBoxList>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="row" id="Pnl_AddDBUser" runat="server" visible="false">
                                            <div class="col-xs-12">
                                                <div class="card">
                                                    <div class="body">
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>*<%= Resources.Content.SMI071%>:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="Txt_UserName" runat="server" MaxLength="100"></asp:TextBox>
                                                                        <asp:RequiredFieldValidator ID="RFV_Txt_UserName" runat="server" ControlToValidate="Txt_UserName"
                                                                            Enable="false" Display="None" ValidationGroup="DataBasesEdit" SetFocusOnError="True">
                                                                        </asp:RequiredFieldValidator>
                                                                        <asp:RegularExpressionValidator ID="REV_Txt_UserName" runat="server" ControlToValidate="Txt_UserName"
                                                                            Display="None" ValidationGroup="DataBasesEdit" SetFocusOnError="True" ErrorMessage="<%$ Resources:Content,strInvalidName %>"
                                                                            ValidationExpression="^(?=.*[a-zA-Z0-9])[a-zA-Z0-9](?!.*[_\s\-]$)(?!.*^[_\s\-])[a-zA-Z0-9_\s\-]{4,125}[a-zA-Z0-9]$"></asp:RegularExpressionValidator>

                                                                        <%--<asp:Literal ID="Ltl_Txt_UserName" runat="server" Text="e.g. user@localhost or to allow remote access: user@127.0.0.1 or user@anydomain.com" Visible="false"></asp:Literal>
                            <EM:FilteredTextBoxExtender ID="FTB_Txt_UserName" runat="server" TargetControlID="Txt_UserName"
                                FilterType="Numbers,UppercaseLetters,LowercaseLetters,Custom" ValidChars="_-@" />--%>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="col-sm-5 col-xs-12">
                                                                <asp:CheckBox ID="CB_Txt_UserName" runat="server" Text="<%$ Resources:Content,SMI0431%>"
                                                                    Checked="true" Visible="false" />
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>*<%= Resources.Content.GN0000569%>:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="Txt_Password" runat="server" TextMode="Password" MaxLength="24"></asp:TextBox>
                                                                        <asp:RegularExpressionValidator ID="REV_Txt_Password" runat="server" ErrorMessage='Invalid Password.'
                                                                            ControlToValidate="Txt_Password" Display="None" ValidationExpression="^.*(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$"
                                                                            ValidationGroup="DataBasesEdit"></asp:RegularExpressionValidator>
                                                                        <asp:RequiredFieldValidator ID="RFV_Txt_Password" runat="server" ControlToValidate="Txt_Password"
                                                                            Enable="false" Display="None" ValidationGroup="DataBasesEdit">
                                                                        </asp:RequiredFieldValidator>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="col-sm-5 col-xs-12">
                                                                <asp:Label ID="Label2" runat="server" Font-Bold="true" EnableViewState="false" Text="<%$ Resources:Content,L00135%>"></asp:Label>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <label>*<%= Resources.Content.SMI0576%>:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="Txt_ConPass" runat="server" TextMode="Password" MaxLength="24"></asp:TextBox>
                                                                        <asp:RegularExpressionValidator ID="REV_Txt_ConPass" runat="server" ErrorMessage='Invalid Password.'
                                                                            ControlToValidate="Txt_ConPass" Display="None" SetFocusOnError="True" ValidationExpression="^.*(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$"
                                                                            ValidationGroup="DataBasesEdit"></asp:RegularExpressionValidator>
                                                                        <asp:RequiredFieldValidator ID="RFV_Txt_ConPass" runat="server" ControlToValidate="Txt_ConPass"
                                                                            Enable="false" Display="None" ValidationGroup="DataBasesEdit" SetFocusOnError="True">
                                                                        </asp:RequiredFieldValidator>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="col-sm-5 col-xs-12">
                                                                <asp:Label ID="Label3" runat="server" Font-Bold="true" EnableViewState="false" Text="<%$ Resources:Content,L00135%>"></asp:Label>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-xs-12">
                                                                <asp:ValidationSummary ID="ValidationSummary1" runat="server" HeaderText='<%$ Resources:Content, EM000001 %>'
                                                                    ShowMessageBox="True" ShowSummary="False" ValidationGroup="DataBasesEdit" />

                                                                <asp:Button ID="LBtn_AddUserEdit" runat="server" Text="<%$ Resources:Content,DEV1101%>" ValidationGroup="DataBasesEdit"
                                                                    class="btn btn-primary waves-effect btnAction" />
                                                                <asp:Button ID="Btn_Back" runat="server" Text="<%$ Resources:Content,GN0000483%>" CausesValidation="false" class="btn btn-primary waves-effect" />
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <%--Database size stats--%>
                                        <div class="row">
                                            <div class="col-xs-12">
                                                <div class="card">
                                                    <div class="header">
                                                        <h3><%= Resources.Content.SPT002084%></h3>
                                                    </div>
                                                    <div class="body">
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs12 row-label">
                                                                <asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:Content,SPT002085%>"
                                                                    EnableViewState="false" />:
                                                            </div>
                                                            <div class="col-sm-9 col-xs12">
                                                                <asp:Literal ID="Ltl_DataFileName" runat="server"></asp:Literal>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Literal ID="Literal7" runat="server" Text="<%$ Resources:Content,SPT002086%>"
                                                                    EnableViewState="false" />:
                                                            </div>
                                                            <div class="col-sm-9 col-xs-12">
                                                                <asp:Literal ID="Ltl_DataFileSizeMB" runat="server"></asp:Literal>
                                                                MB
                                                            </div>
                                                        </div>
                                                        <div class="row" id="Tr_LogFileName" runat="server">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Literal ID="Literal8" runat="server" Text="<%$ Resources:Content,SPT002087%>"
                                                                    EnableViewState="false" />:
                                                            </div>
                                                            <div class="col-sm-9 col-xs-12">
                                                                <asp:Literal ID="Ltl_LogFileName" runat="server"></asp:Literal>
                                                            </div>
                                                        </div>
                                                        <div class="row" id="Tr_LogFileSize" runat="server">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Literal ID="Literal9" runat="server" Text="<%$ Resources:Content,SPT002088%>"
                                                                    EnableViewState="false" />:
                                                            </div>
                                                            <div class="col-sm-9 col-xs-12">
                                                                <asp:Literal ID="Ltl_LogFileSizeMB" runat="server"></asp:Literal>
                                                                MB
                                                            </div>
                                                        </div>
                                                        <div class="row" id="Tr_TotalDBSize" runat="server">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:Content,SMI0435%>" EnableViewState="false" />:
                                                            </div>
                                                            <div class="col-sm-9 col-xs-12">
                                                                <asp:Literal ID="Ltl_DBFileSizeMB" runat="server"></asp:Literal>
                                                                MB
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <%--Database maintenance--%>
                                        <div class="row" id="Tbl_Maintainace" runat="server">
                                            <div class="col-xs-12">
                                                <div class="card">
                                                    <div class="header">
                                                        <h3><%= Resources.Content.SPT002089%></h3>
                                                    </div>
                                                    <div class="body">
                                                        <div class="row" id="Tr_BackupStatus" runat="server" visible="false">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Literal ID="Ltl_BackupStats" runat="server" Text="<%$ Resources:Content,SMI0436%>"></asp:Literal>:
                                                            </div>
                                                            <div class="col-sm-9 col-xs-12">
                                                                <asp:Literal ID="Ltl_BackupStatus" runat="server"></asp:Literal>
                                                            </div>
                                                        </div>
                                                        <div class="row" id="Tr_BackupRestoreOperations" runat="server">
                                                            <div class="col-xs-12">
                                                                <asp:Button ID="Btn_BackupDbs" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,SPT002090%>"
                                                                    runat="server" CausesValidation="false" />
                                                                <asp:Button ID="LB_Restore" class="btn btn-primary waves-effect btnAction" runat="server" Text="<%$ Resources:Content,SMI0437%>" CausesValidation="false" />
                                                            </div>
                                                        </div>
                                                        <div class="row" id="Tr_RestoreStatus" runat="server" visible="false">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Literal ID="Literal15" runat="server" Text="<%$ Resources:Content,SMI0438%>" EnableViewState="false"></asp:Literal>:
                                                            </div>
                                                            <div class="col-sm-9 col-xs-12">
                                                                <asp:Literal ID="Ltl_RestoreStatus" runat="server"></asp:Literal>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <%--Database restore--%>
                                        <div class="row" id="Tbl_Restore" runat="server">
                                            <div class="col-xs-12">
                                                <div class="card">
                                                    <div class="body">
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs12 row-label">
                                                                <label>
                                                                    *<asp:Literal ID="Literal12" runat="server" Text="<%$ Resources:Content,SPT002092%>"
                                                                        EnableViewState="false" />:</label>
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_Upload" Enabled="false" runat="server" ReadOnly="true"></asp:TextBox>
                                                                        <asp:RequiredFieldValidator ID="RFV_TxBx_Upload" runat="server" ControlToValidate="TxBx_Upload"
                                                                            Display="None" ValidationGroup="DataBasesRestore" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="col-sm-5 col-xs-12">
                                                                <asp:Button ID="Btn_Upload" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,SPT002093%>" CausesValidation="false"
                                                                    runat="server" />
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-xs-12">
                                                                <asp:ValidationSummary ID="ValidationSummary3" runat="server" HeaderText='<%$ Resources:Content, EM000001 %>'
                                                                    ShowMessageBox="True" ShowSummary="False" ValidationGroup="DataBasesRestore" />

                                                                <asp:Button ID="Btn_Restore" class="btn btn-primary waves-effect btnAction" runat="server" ValidationGroup="DataBasesRestore" Text="<%$ Resources:Content,SMI0441%>" />
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <%--Upload Database backup --%>
                                        <div class="row" id="Div_UploadDBBackup" runat="server">
                                            <div class="col-xs-12">
                                                <div class="card">
                                                    <div class="header">
                                                        <h3><%= Resources.Content.DEV1180 %></h3>
                                                    </div>
                                                    <div class="body">
                                                        <div class="row">
                                                            <div class="col-sm-4 col-xs12 row-label">
                                                                <label>
                                                                    *<asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content,selectDBBackup4Upload%>"
                                                                        EnableViewState="false" />:</label>
                                                            </div>
                                                            <div class="col-sm-8 col-xs-12">
                                                                <UC:LFU ID="LFU_1" runat="server" />
                                                            </div>
                                                        </div>
                                                        <%--<div class="row" id="Div_UploadPending" runat="server" visible="false">
                                                    <div class="col-xs-12 row-label">
                                                        <asp:Literal ID="Ltl_backupTransferPending" runat="server" Text="<%$ Resources:Content,backupTransferPending%>"
                                                            EnableViewState="false" />
                                                    </div>
                                                </div>--%>
                                                        <div class="row">
                                                            <div class="col-xs-12">
                                                                <asp:Button ID="Btn_UploadDBBackup" class="btn btn-primary waves-effect btnAction" runat="server" Text="<%$ Resources:Content,GN0000281%>" />
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <%--Manage Database backups --%>
                                        <div class="row" id="Div_DBBackups" runat="server">
                                            <div class="col-xs-12">
                                                <div class="card">
                                                    <div class="header">
                                                        <h3><%= Resources.Content.DatabaseBackupsManager %></h3>
                                                    </div>
                                                    <div class="body">
                                                        <div class="row">
                                                            <div class="col-xs-12">
                                                                <asp:GridView ID="GV_DBBackups" runat="server" AllowPaging="true" DataSourceID=""
                                                                    CssClass="table table-bordered table-striped table-hover" AutoGenerateColumns="false" EmptyDataText="<%$ Resources:Content,GN00001375%>">

                                                                    <Columns>
                                                                        <asp:TemplateField HeaderText="<%$ Resources:Content,BackupFileName%>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="Lbl_BackupName" runat="server"></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="<%$ Resources:Content,GN000170%>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="Lbl_DBName" runat="server"></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="<%$ Resources:Content,DGN1110244%>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="Lbl_TransferStatus" runat="server"></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="<%$ Resources:Content,GN00001320%>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="LB_Download" runat="server" CssClass="btn btn-primary waves-effect btnAction" CommandName="BackupDownload"
                                                                                    Text="<%$ Resources:Content,SMI0547%>" CausesValidation="false"></asp:LinkButton>
                                                                                <asp:LinkButton ID="LB_Remove" runat="server" CssClass="btn btn-primary waves-effect btnAction" CommandName="BackupRemove"
                                                                                    Text='<%$ Resources:Content, GN0000278 %>' CausesValidation="false"></asp:LinkButton>
                                                                                <EM:ConfirmButtonExtender ID="CBE_Remove" runat="server" ConfirmText="<%$Resources:Content,CBE001%>"
                                                                                    TargetControlID="LB_Remove">
                                                                                </EM:ConfirmButtonExtender>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                    <%--PagerTemplate Start--%>
                                                                    <PagerTemplate>
                                                                        <EM:Pager ID="Pager3" runat="server" />
                                                                    </PagerTemplate>
                                                                    <%--PagerTemplate End--%>
                                                                </asp:GridView>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <%--Database users tab--%>
                    <div class="row" id="Pnl_DatabseUsers" runat="server" visible="false">
                        <div class="col-xs-12">
                            <ajax:UpdatePanel ID="UPnl_DBUsers" runat="server">
                                <ContentTemplate>
                                    <div class="row" id="Pnl_GridUser" runat="server">
                                        <%--Search Option--%>
                                        <asp:Panel ID="Pnl_FilterDBUser" runat="server" DefaultButton="Btn_SrchDBUser">
                                            <div class="panel-group search-panel" id="AS_DatabaseUser" role="tablist" aria-multiselectable="true">
                                                <div class="col-xs-12" role="tab" id="SH_DatabaseUser">
                                                    <div class="card">
                                                        <div class="header" role="button" data-toggle="collapse" data-parent="#AS_DatabaseUser" href="#<%= CSB_DatabaseUser.ClientID%>" aria-expanded="true" aria-controls="SH_DatabaseUser">
                                                            <h3>
                                                                <%= Resources.Content.GN0000395%>
                                                            </h3>
                                                        </div>
                                                        <div id="CSB_DatabaseUser" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_DatabaseUser" aria-expanded="false">
                                                            <div class="row">
                                                                <%--<div class="col-md-3 col-sm-6 col-xs-12" runat="server" id="td_OwnerUser">
                                                                        <div class="form-group form-float">
                                                                            <asp:DropDownList ID="DDL_OwnerUser" runat="server" onchange="setOwnerCookie(this)"></asp:DropDownList>
                                                                        </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_DatabaseNameUser" runat="server"></asp:TextBox>
                                                                            <asp:Label ID="Label4" runat="server" EnableViewState="false" Text="<%$ Resources:Content,SPT002073%>" 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_DBUserNameFilter" runat="server"></asp:TextBox>
                                                                            <asp:Label ID="Label5" runat="server" EnableViewState="false" Text="<%$ Resources:Content,USM0061%>" 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">
                                                                        <asp:DropDownList ID="DDL_RolesFilter" runat="server">
                                                                            <asp:ListItem Text="<%$ Resources:Content,SMI687%>" Value="-1"></asp:ListItem>
                                                                            <asp:ListItem Text="public" Value="1"></asp:ListItem>
                                                                            <asp:ListItem Text="db_owner" Value="2"></asp:ListItem>
                                                                        </asp:DropDownList>
                                                                    </div>
                                                                </div>

                                                                <div class="col-xs-12">
                                                                    <div class="form-group form-float">
                                                                        <asp:Button ID="Btn_SrchDBUser" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000391%>" />
                                                                        <asp:Button ID="Btn_ClearDBUser" Visible="false" class="btn btn-primary waves-effect" runat="server"
                                                                            Text="<%$ Resources:Content,String289 %>" />
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </asp:Panel>

                                        <div class="col-xs-12 Div_OpsRow" id="Div_OpsRow2" runat="server">
                                            <%--Database users list--%>
                                            <div class="card">
                                                <div class="header">
                                                    <h3><%= Resources.Content.GN00001320%></h3>
                                                </div>
                                                <div class="body">
                                                    <div class="row">
                                                        <div class="col-xs-12">
                                                            <asp:Button ID="Btn_AddUser" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,SPT002094%>"
                                                                CausesValidation="false" />
                                                            <asp:Button ID="Btn_UpdateUsers" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,UpdateUsers%>"
                                                                CausesValidation="false" />
                                                            <asp:Button ID="Btn_RemoveAllUsers" runat="server" Custom1="Custom" Style="display: none"
                                                                Text="<%$ Resources:Content,GN0000278%>" CssClass="btn btn-primary waves-effect btnAction" />
                                                            <EM:ConfirmButtonExtender ID="CBE_RemoveAll" runat="server" TargetControlID="Btn_RemoveAllUsers" />
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-xs-12">
                                            <asp:GridView ID="GV_DBUser" runat="server" AllowPaging="true" DataSourceID="" CssClass="table table-bordered table-striped table-hover"
                                                AutoGenerateColumns="false" EmptyDataText="<%$ Resources:Content,GN00001375%>">
                                                <Columns>
                                                    <asp:TemplateField HeaderText="<%$ Resources:Content,strUser%>" HeaderStyle-CssClass="col-xs-4" ItemStyle-CssClass="col-xs-4">
                                                        <HeaderTemplate>
                                                            <asp:CheckBox runat="server" ID="ChkBx_All" onclick="SetCheckedHeader(this.checked, this, 'All');"
                                                                Text=" " />
                                                            <asp:Literal runat="server" Text="<%$ Resources:Content,strUser%>"></asp:Literal>
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <asp:CheckBox Text=" " ID="ChkBx_All" runat="server" onclick="SetCheckedHeader(this.checked, this,'1');" />
                                                            <%--<asp:LinkButton ID="Lbl_Name" CommandName="Show_UserDetail" runat="server"></asp:LinkButton>--%>
                                                            <asp:Label ID="Lbl_Name" runat="server"></asp:Label>
                                                            <asp:HiddenField ID="HF_Name" runat="server"></asp:HiddenField>
                                                            <div id="Div_LoginStatus" runat="server" visible="false"></div>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="<%$ Resources:Content,String18%>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                                        <ItemTemplate>
                                                            <asp:Label ID="Lbl_DBName" runat="server"></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="<%$ Resources:Content,SMI726%>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                        <ItemTemplate>
                                                            <asp:Label ID="Lbl_Roles" runat="server"></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="<%$ Resources:Content,GN00001320%>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="LB_SetPassword" runat="server" CssClass="btn btn-primary waves-effect btnAction" CommandName="UserEdit"
                                                                Text="<%$ Resources:Content, DGN1110442 %>" CausesValidation="false"></asp:LinkButton>
                                                            <asp:LinkButton ID="LB_SetDBOwner" runat="server" CssClass="btn btn-primary waves-effect btnAction" CommandName="SetDBOwner"
                                                                Text="<%$ Resources:Content, setAsOwner %>" CausesValidation="false"></asp:LinkButton>
                                                            <asp:LinkButton ID="LB_Remove" runat="server" CssClass="btn btn-primary waves-effect btnAction" CommandName="UserRemove"
                                                                Text='<%$ Resources:Content, GN0000278 %>' CausesValidation="false"></asp:LinkButton>
                                                            <EM:ConfirmButtonExtender ID="CBE_Remove" runat="server" ConfirmText="<%$Resources:Content,CBE001%>"
                                                                TargetControlID="LB_Remove">
                                                            </EM:ConfirmButtonExtender>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <%--PagerTemplate Start--%>
                                                <PagerTemplate>
                                                    <EM:Pager ID="Pager1" runat="server" />
                                                </PagerTemplate>
                                                <%--PagerTemplate End--%>
                                            </asp:GridView>
                                        </div>
                                    </div>

                                    <div class="card" id="Pnl_EditUser" runat="server">
                                        <div class="header">
                                            <h3>
                                                <asp:Literal ID="Lbl_AddDatabaseUser" runat="server" Text="<%$ Resources:Content,SPT002094%>"
                                                    EnableViewState="false" />
                                            </h3>
                                        </div>
                                        <div class="body">
                                            <div class="row" id="Div_ProviderDDLAddUser" runat="server">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <label>
                                                        <asp:Literal ID="Literal40" runat="server" Text="<%$ Resources:Content,DGN1110096%>"
                                                            EnableViewState="false" />:</label>
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <asp:DropDownList ID="DDL_ProviderAddUser" AutoPostBack="true" runat="server" />
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="row" id="Div_HostedOrgInUsers" runat="server">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <label>
                                                        <asp:Literal ID="Literal28" runat="server" Text="<%$ Resources:Content,LinkedHostedOrg%>"
                                                            EnableViewState="false" />:</label>
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <asp:DropDownList ID="DDL_HostedOrgInUsers" runat="server" AutoPostBack="true" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row" id="Div_ADUsersAddInUsers" runat="server" visible="false">
                                                <div class="col-xs-12 row-label">
                                                    <asp:Literal ID="Literal24" runat="server" Text="<%$ Resources:Content,strSelectADUser%>"
                                                        EnableViewState="false" />:
                                                </div>
                                                <div class="col-xs-12">
                                                    <ajax:UpdatePanel ID="UP_ADUsersInUsers" runat="server">
                                                        <ContentTemplate>
                                                            <EM:AddSelectableSelected ID="UCADUsersInUsers" runat="server" />
                                                        </ContentTemplate>
                                                    </ajax:UpdatePanel>
                                                </div>
                                            </div>

                                            <div class="row" id="Div_UserNameToView" runat="server" visible="false">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <label>*<asp:Literal ID="Literal33" runat="server" Text="<%$ Resources:Content,USM0061%>" EnableViewState="false" />:</label>
                                                </div>
                                                <div class="col-sm-4 col-xs-12" id="TD_UserNameToView" runat="server">
                                                </div>
                                                <div class="col-sm-5 col-xs-12">
                                                </div>
                                            </div>

                                            <div id="Div_AddSQLUserInUsers" runat="server">
                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        <label>*<asp:Literal ID="Literal20" runat="server" Text="<%$ Resources:Content,USM0061%>" EnableViewState="false" />:</label>
                                                    </div>
                                                    <div class="col-sm-4 col-xs-12">
                                                        <div class="form-group">
                                                            <div class="form-line">
                                                                <asp:TextBox ID="TxBx_UserName" MaxLength="100" runat="server"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RFV_TxBx_UserName" runat="server" ControlToValidate="TxBx_UserName"
                                                                    Display="None" ValidationGroup="DataBaseUsers" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                                <asp:RegularExpressionValidator ID="REV_TxBx_UserName" runat="server" ControlToValidate="TxBx_UserName"
                                                                    Display="None" ValidationGroup="DataBaseUsers" SetFocusOnError="True" ErrorMessage="<%$ Resources:Content,strInvalidName %>"
                                                                    ValidationExpression="^(?=.*[a-zA-Z0-9])[a-zA-Z0-9](?!.*[_\s\-]$)(?!.*^[_\s\-])[a-zA-Z0-9_\s\-]{4,125}[a-zA-Z0-9]$"></asp:RegularExpressionValidator>
                                                                <EM:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxBx_UserName"
                                                                    FilterType="Numbers,UppercaseLetters,LowercaseLetters,Custom" ValidChars="_- " />
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-5 col-xs-12">
                                                        <asp:Literal ID="Ltl_DataBaseUserNameHelp" runat="server" Text="<%$ Resources:Content,SMI0430%>"></asp:Literal>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        <label>*<asp:Literal ID="Literal21" runat="server" Text="<%$ Resources:Content,GN0000569%>" EnableViewState="false" />:</label>
                                                    </div>
                                                    <div class="col-sm-4 col-xs-12">
                                                        <div class="form-group">
                                                            <div class="form-line">
                                                                <asp:TextBox ID="TxBx_Password" TextMode="Password" MaxLength="24" runat="server"></asp:TextBox>
                                                                <asp:RegularExpressionValidator ID="REV_TxBx_UserPassword" runat="server" ErrorMessage='Invalid Password.'
                                                                    ControlToValidate="TxBx_Password" Display="None" SetFocusOnError="True" ValidationExpression="^.*(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$"
                                                                    ValidationGroup="DataBaseUsers"></asp:RegularExpressionValidator>
                                                                <%--<asp:RequiredFieldValidator ID="RFV_TxBx_Password" runat="server" ControlToValidate="TxBx_Password"
                                                                Display="None" ValidationGroup="DataBaseUsers" SetFocusOnError="True"></asp:RequiredFieldValidator>--%>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-5 col-xs-12">
                                                        <asp:Label ID="Label1" runat="server" EnableViewState="false" Text="<%$ Resources:Content,L00135%>"></asp:Label>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        <label>*<asp:Literal ID="Literal22" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0001196%>" />:</label>
                                                    </div>
                                                    <div class="col-sm-4 col-xs-12">
                                                        <div class="form-group">
                                                            <div class="form-line">
                                                                <asp:TextBox ID="TxBx_ConfPassword" runat="server" TextMode="Password" MaxLength="24"></asp:TextBox>
                                                                <asp:CompareValidator ID="CV_TxBx_ConfPassword" runat="server" ControlToCompare="TxBx_Password"
                                                                    ControlToValidate="TxBx_ConfPassword" Display="None" ValidationGroup="DataBaseUsers"
                                                                    ErrorMessage='<%$ Resources:Content,DGN1110005 %>'></asp:CompareValidator>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-5 col-xs-12">
                                                        <asp:Literal ID="Literal32" runat="server" Text="<%$ Resources:Content,GN00001530%>"
                                                            EnableViewState="false"></asp:Literal>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="row" id="Div_AvailDB" runat="server">
                                                <div class="col-xs-12 row-label">
                                                    <label>
                                                        *<asp:Literal ID="LiteralDB" runat="Server" EnableViewState="false" Text="<%$ Resources:Content,SMI0444%>"></asp:Literal>:</label>
                                                </div>
                                                <div class="col-xs-12">
                                                    <ajax:UpdatePanel ID="UP_AvailDB" runat="server">
                                                        <ContentTemplate>
                                                            <EM:AddSelectableSelected ID="UCAvailDB" runat="server" />
                                                        </ContentTemplate>
                                                    </ajax:UpdatePanel>
                                                </div>
                                            </div>

                                            <div class="row" id="Div_NewRolesInUsers" runat="server">
                                                <div class="col-sm-3 col-xs-12 row-label">
                                                    <label>
                                                        *<asp:Literal ID="Literal29" runat="server" Text="<%$ Resources:Content,SMI0432%>"
                                                            EnableViewState="false" />:</label>
                                                </div>
                                                <div class="col-sm-4 col-xs-12">
                                                    <div class="form-group">
                                                        <asp:CheckBoxList ID="ChBxL_NewRolesInUsers" runat="server" Width="100%" RepeatColumns="3" RepeatLayout="Table">
                                                            <asp:ListItem Text="public" Selected="True" Enabled="false" Value="1"></asp:ListItem>
                                                            <asp:ListItem Text="db_owner" Selected="True" Value="2"></asp:ListItem>
                                                        </asp:CheckBoxList>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="row">
                                                <div class="col-xs-12">
                                                    <asp:ValidationSummary ID="ValidationSummary2" runat="server" HeaderText='<%$ Resources:Content, EM000001 %>'
                                                        ShowMessageBox="True" ShowSummary="False" ValidationGroup="DataBaseUsers" />
                                                    <asp:Button ID="Btn_Save" Text="<%$ Resources:Content,GN0000281%>" class="btn btn-primary waves-effect btnAction" runat="server" ValidationGroup="DataBaseUsers" />
                                                    <asp:Button ID="Btn_Cancel" Text="<%$ Resources:Content,GN0000572%>" class="btn btn-primary waves-effect" runat="server" CausesValidation="false" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div id="Div_BulkUpdateUsers" runat="server" visible="false">
                                        <div class="card">
                                            <div class="header">
                                                <h3><%= Resources.Content.UpdateUsers%></h3>
                                            </div>
                                            <div class="body">
                                                <div class="row" id="Div_ProviderDDLUpdateUser" runat="server">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        <label>
                                                            <asp:Literal ID="Literal41" runat="server" Text="<%$ Resources:Content,DGN1110096%>"
                                                                EnableViewState="false" />:</label>
                                                    </div>
                                                    <div class="col-sm-4 col-xs-12">
                                                        <div class="form-group">
                                                            <asp:DropDownList ID="DDL_ProviderUpdateUser" AutoPostBack="true" runat="server" />
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="row" id="Div_HostedOrgInUsersUpdate" runat="server">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        <label>
                                                            <asp:Literal ID="Literal39" runat="server" Text="<%$ Resources:Content,LinkedHostedOrg%>"
                                                                EnableViewState="false" />:</label>
                                                    </div>
                                                    <div class="col-sm-4 col-xs-12">
                                                        <div class="form-group">
                                                            <asp:DropDownList ID="DDL_HostedOrgInUsersUpdate" runat="server" AutoPostBack="true" />
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-xs-12 row-label">
                                                        <asp:Literal ID="Literal36" runat="server" Text="<%$ Resources:Content,SelectUsers%>"
                                                            EnableViewState="false" />:
                                                    </div>
                                                    <div class="col-xs-12">
                                                        <ajax:UpdatePanel ID="UP_SelectUsers" runat="server">
                                                            <ContentTemplate>
                                                                <EM:AddSelectableSelected ID="UCSelectUsers" runat="server" />
                                                            </ContentTemplate>
                                                        </ajax:UpdatePanel>
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-xs-12 row-label">
                                                        <asp:Literal ID="Literal35" runat="server" Text="<%$ Resources:Content,SelectDatabases%>"
                                                            EnableViewState="false" />:
                                                    </div>
                                                    <div class="col-xs-12">
                                                        <ajax:UpdatePanel ID="UP_SelectDatabases" runat="server">
                                                            <ContentTemplate>
                                                                <EM:AddSelectableSelected ID="UCSelectDatabases" runat="server" />
                                                            </ContentTemplate>
                                                        </ajax:UpdatePanel>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <br />
                                        <div class="card" id="Div_UpdateUserRoles" runat="server">
                                            <div class="header">
                                                <h3><%= Resources.Content.FAM00174%></h3>
                                            </div>
                                            <div class="body">
                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        <label>
                                                            *<asp:Literal ID="Literal44" runat="server" Text="<%$ Resources:Content,SMI0432%>"
                                                                EnableViewState="false" />:</label>
                                                    </div>
                                                    <div class="col-sm-4 col-xs-12">
                                                        <div class="form-group">
                                                            <asp:CheckBoxList ID="CBL_BulkUpdateRoles" runat="server" Width="100%" RepeatColumns="3" RepeatLayout="Table">
                                                                <asp:ListItem Text="public" Selected="True" Enabled="false" Value="1"></asp:ListItem>
                                                                <asp:ListItem Text="db_owner" Selected="True" Value="2"></asp:ListItem>
                                                            </asp:CheckBoxList>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-xs-12">
                                                        <asp:ValidationSummary ID="ValidationSummary4" runat="server" HeaderText='<%$ Resources:Content, EM000001 %>'
                                                            ShowMessageBox="True" ShowSummary="False" ValidationGroup="BulkUpdateUsers" />
                                                        <asp:Button ID="Btn_BulkUpdateUserRoles" Text="<%$ Resources:Content,FAM00174%>" class="btn btn-primary waves-effect btnAction" runat="server" ValidationGroup="BulkUpdateUsers" />
                                                        <asp:Button ID="Btn_CancelBulkUpdateUsers" Text="<%$ Resources:Content,GN0000572%>" class="btn btn-primary waves-effect"
                                                            Visible="false" runat="server" CausesValidation="false" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <br />
                                        <div class="card">
                                            <div class="header">
                                                <h3><%= Resources.Content.UpdateLoginStatus%></h3>
                                            </div>
                                            <div class="body">
                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        <label>
                                                            <asp:Literal ID="Literal37" runat="server" Text="<%$ Resources:Content,PermissionToConnectDBEngine%>"
                                                                EnableViewState="false" />:</label>
                                                    </div>
                                                    <div class="col-sm-4 col-xs-12">
                                                        <div class="form-group">
                                                            <asp:RadioButtonList ID="RBL_PermissionToConnectDBEngine" runat="server">
                                                                <asp:ListItem Text="Grant" Value="Grant" Selected="True"></asp:ListItem>
                                                                <asp:ListItem Text="Deny" Value="Deny"></asp:ListItem>
                                                            </asp:RadioButtonList>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        <label>
                                                            <asp:Literal ID="Literal38" runat="server" Text="Login"
                                                                EnableViewState="false" />:</label>
                                                    </div>
                                                    <div class="col-sm-4 col-xs-12">
                                                        <div class="form-group">
                                                            <asp:RadioButtonList ID="RBL_Login" runat="server">
                                                                <asp:ListItem Text="<%$ Resources:Content,strEnabled %>" Value="Enabled" Selected="True"></asp:ListItem>
                                                                <asp:ListItem Text="<%$ Resources:Content,Disabled %>" Value="Disabled"></asp:ListItem>
                                                            </asp:RadioButtonList>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-xs-12">
                                                        <asp:ValidationSummary ID="ValidationSummary5" runat="server" HeaderText='<%$ Resources:Content, EM000001 %>'
                                                            ShowMessageBox="True" ShowSummary="False" ValidationGroup="BulkUpdateUsers" />
                                                        <asp:Button ID="Btn_BulkUpdateUserLoginStatus" Text="<%$ Resources:Content,UpdateLoginStatus%>" class="btn btn-primary waves-effect btnAction" runat="server" ValidationGroup="BulkUpdateUsers" />
                                                        <asp:Button ID="Btn_CancelBulkUpdateUsers2" Text="<%$ Resources:Content,GN0000572%>" class="btn btn-primary waves-effect"
                                                            Visible="false" runat="server" CausesValidation="false" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </ajax:UpdatePanel>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<asp:Panel ID="Panel2" CssClass="width-modal-popup-auto" runat="server" Style="display: none">
    <%--<EM:FileManager ID="FileManager" runat="server" />--%>
    <ajax:UpdatePanel ID="update1" runat="server">
        <ContentTemplate>
            <div class="card">
                <div class="header">
                    <h3>File Browser</h3>
                </div>
                <div class="body">
                    <div class="row">
                        <div class="col-sm-3 col-xs-6">
                            <asp:Panel ID="Pnl_Tree" runat="server" Width="100%" Height="400px" BorderColor="ActiveBorder"
                                BorderStyle="Groove" ScrollBars="Auto">
                                <asp:TreeView ID="TV_Browsers" runat="server"></asp:TreeView>
                            </asp:Panel>
                        </div>
                        <div class="col-sm-9 col-xs-6">
                            <asp:Panel ID="Panel1" runat="server" Height="400px" Width="100%" BorderColor="ActiveBorder"
                                BorderStyle="Groove" ScrollBars="Auto">
                                <asp:GridView ID="GV_Browsers" runat="server" AllowPaging="true" CssClass="table table-bordered table-striped table-hover"
                                    AutoGenerateColumns="false" EmptyDataText="<%$ Resources:Content,GN00001375%>"
                                    PageSize="500">

                                    <Columns>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,GN000170%>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                            <ItemTemplate>
                                                <%--<asp:Label ID="Lbl_Name" runat="server"></asp:Label>--%>
                                                <asp:LinkButton ID="LB_Name" runat="server" CommandName="Name" CausesValidation="false"></asp:LinkButton>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,DGN1119982%>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_Size" runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,GN0000673%>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_Type" runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,SMI0439%>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_DateModified" runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,GN00001496%>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_DateCreated" runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <PagerTemplate>
                                        <EM:Pager ID="Pager1" runat="server" />
                                    </PagerTemplate>
                                </asp:GridView>
                            </asp:Panel>
                        </div>
                    </div>
                    <div class="row" id="Tr_TextBox" runat="server">
                        <div class="col-sm-3 col-xs-12 row-label">
                            *<asp:Label ID="Lbl_TextItem" runat="server" Text="<%$ Resources:Content,SMI0440%>"></asp:Label>
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <div class="form-group">
                                <div class="form-line">
                                    <asp:TextBox ID="TxBx_Item" runat="server" ReadOnly="true" Enabled="false"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RFV_TxBx_Item" runat="server" ControlToValidate="TxBx_Item"
                                        Display="None" ValidationGroup="DataBasesBrowser" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-5 col-xs-12">
                            <asp:Button ID="Btn_Done" runat="server" Text="<%$ Resources:Content,GN0001184%>" class="btn btn-primary waves-effect btnAction" OnClientClick="return SetHomeDir();" ValidationGroup="DataBasesBrowser" />
                            <asp:Button ID="Btn_Close" runat="server" Text="<%$ Resources:Content,GN000150%>" class="btn btn-primary waves-effect" CausesValidation="false" />
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
        <Triggers>
            <ajax:AsyncPostBackTrigger ControlID="Btn_Upload" />
        </Triggers>
    </ajax:UpdatePanel>
</asp:Panel>
<EM:ModalPopupExtender runat="server" ID="MPE_Browse" BackgroundCssClass="modalBackground"
    DropShadow="false" CancelControlID="Btn_Close" PopupControlID="Panel2" TargetControlID="Btn_Upload"
    OkControlID="Btn_Done">
</EM:ModalPopupExtender>

<%--Resources Grid Pannel--%>
<ajax:UpdatePanel ID="UP_Resources" UpdateMode="Always" runat="server">
    <ContentTemplate>
        <asp:Button ID="Btn_Display" runat="server" Style="display: none;" />
        <asp:Panel ID="Panel_Res" runat="server" BorderColor="ActiveBorder" BorderStyle="Groove"
            ScrollBars="Auto" Style="display: none" CssClass="width-modal-popup-auto">
            <EM:ResourceQuota runat="server" ID="ResourceQuotaView" />
        </asp:Panel>
        <EM:ModalPopupExtender runat="server" ID="MPE_Resource" BackgroundCssClass="modalBackground"
            DropShadow="false" PopupControlID="Panel_Res" TargetControlID="Btn_Display">
        </EM:ModalPopupExtender>
    </ContentTemplate>
</ajax:UpdatePanel>

<%--AG Logs Pannel--%>
<ajax:UpdatePanel ID="UP_AGLogs" UpdateMode="Always" runat="server">
    <ContentTemplate>
        <asp:Button ID="Btn_DisplayAG" runat="server" Style="display: none;" />
        <asp:Panel ID="Pnl_AGLogs" runat="server" BorderColor="ActiveBorder" BorderStyle="Groove"
            ScrollBars="Auto" Style="display: none" CssClass="width-modal-popup-auto">
            <div class="row">
                <div class="col-xs-12" id="Div_AGLogs" runat="server">

                </div>
                <div class="col-xs-12">
                    <asp:Button ID="Btn_CLoseAG" runat="server" Text="<%$ Resources:Content,GN000150%>" class="btn btn-primary waves-effect" CausesValidation="false" />
                </div>
            </div>
        </asp:Panel>
        <EM:ModalPopupExtender runat="server" ID="MPE_AGLogs" BackgroundCssClass="modalBackground"
            DropShadow="false" PopupControlID="Pnl_AGLogs" TargetControlID="Btn_DisplayAG" CancelControlID="Btn_CloseAG">
        </EM:ModalPopupExtender>
    </ContentTemplate>
</ajax:UpdatePanel>

<script language="javascript" type="text/javascript">
    function SetHomeDir() {
        var modalSelectedDir = document.getElementById('<%= TxBx_Item.ClientID %>');
        var UploadDir = document.getElementById('<%= TxBx_Upload.ClientID %>');
        //alert("ModelDir = " + modalSelectedDir.value);
        //alert("HomeDir = " + HomeDir.value);
        UploadDir.value = modalSelectedDir.value;
        //alert("Selected Dir = " + HomeDir.value);
        return true;
    }
    AllowArrowKeysInFilteredTextBoxExtender('<%=FilteredTextBoxExtender3.ClientID%>');
    AllowArrowKeysInFilteredTextBoxExtender('<%=FTE_TxBx_DBName.ClientID%>');
</script>
