<%@ control language="VB" autoeventwireup="false" inherits="RCC_CC_SharePointBulkUser, MachSol.MachPanel.Web" %>

<%@ Register Assembly="MachSol.MachPanel.Utility" Namespace="MachSol.MachPanel.Utility" TagPrefix="EM" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>

<asp:Panel ID="Pnl_BulkStep1" runat="server">
    <div class="row">
        <div class="col-xs-12">
            <div class="card">
                <div class="header">
                    <h3>
                        <asp:Literal ID="Literal82" runat="server" EnableViewState="false" Text="<%$ Resources:Content,Str00089%>" />
                    </h3>
                </div>

                <div class="body">
                    <div class="row">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Literal ID="Literal14" runat="server" Text='<%$ Resources:Content,GN00001322%>' />
                        </div>
                        <div class="col-sm-4 col-xs-12 row-label">
                            <asp:RadioButtonList ID="RBL_SelectUser" runat="server" AutoPostBack="true">
                                <asp:ListItem Enabled="true" Text="<%$ Resources:Content,STR00898%>" Value="0">
                                </asp:ListItem>
                                <asp:ListItem Text="<%$ Resources:Content,DEV1102%>" Value="1">
                                </asp:ListItem>
                            </asp:RadioButtonList>
                        </div>
                    </div>
                    <div class="row" id="DivDomain" runat="server">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Literal ID="Ltrl_DomainName" runat="server" Text="<%$Resources:Content,DGN1110334 %>"></asp:Literal>
                        </div>
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:DropDownList ID="Ddl_Domain" runat="server"></asp:DropDownList>
                        </div>
                    </div>
                    <div class="row" id="Tr_CSV" runat="server">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Literal ID="Literal77" EnableViewState="false" runat="server" Text="<%$ Resources:Content,String380%>" />:
                        </div>
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:FileUpload ID="FU_BulkUser" runat="server" />
                            &nbsp;&nbsp;&nbsp;
                                     
                            <asp:RequiredFieldValidator ID="RFV_BulkUser" runat="server" ControlToValidate="FU_BulkUser"
                                Display="None" SetFocusOnError="True" ValidationGroup="AddBulkUser" ErrorMessage='<%$Resources:Content,USM0077 %>'></asp:RequiredFieldValidator>
                        </div>
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Literal ID="Ltl_DownLoadCSV" runat="server"></asp:Literal>
                        </div>
                    </div>
                    <div class="row" id="Tr_CSVExisting" runat="server">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Literal ID="Literal1" EnableViewState="false" runat="server" Text="<%$ Resources:Content,String380%>" />:
                        </div>
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:FileUpload ID="FU_BulkUserExisting" runat="server" />
                            &nbsp;&nbsp;&nbsp;
                                     
                            <asp:RequiredFieldValidator ID="RFV_BulkUserExisting" runat="server" ControlToValidate="FU_BulkUserExisting"
                                Display="None" SetFocusOnError="True" ValidationGroup="AddBulkUser" ErrorMessage='<%$Resources:Content,USM0077 %>'></asp:RequiredFieldValidator>
                        </div>
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Literal ID="Ltl_DownLoadCSVExisting" runat="server"></asp:Literal>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-3 col-xs-12">
                            <asp:Literal ID="Literal20" EnableViewState="false" runat="server" Text="<%$ Resources:Content,Lync048%>" />:
                        </div>
                        <div class="col-sm-3 col-xs-12">
                            <asp:CheckBox ID="CB_SetupEmail" runat="server" Text=" " Checked="true" />
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:ValidationSummary ID="VS_AddBulkUser" runat="server" ShowMessageBox="true"
                                ShowSummary="false" ValidationGroup="AddBulkUser" HeaderText="<%$ Resources:Content,EM000001%>" />
                            <asp:Button ID="Btn_Next" runat="server" ValidationGroup="AddBulkUser" CausesValidation="True" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000281%>" />
                            <asp:Button ID="Btn_BUserCancel" runat="server" CausesValidation="false" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000572%>" />

                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</asp:Panel>
<asp:Panel ID="Pnl_BulkStep2" runat="server" Visible="false">

    <div class="row">
        <div class="col-xs-12">
            <div class="card">

                <div class="body">
                    <div class="row">
                        <div class="col-xs-12">
                            <EM:MPGridView ID="GV_BulkUsers" CurrentSortExpression="DisplayName" CurrentSortDirection="Asc"
                                CssClass="table table-bordered table-striped table-hover" runat="server" AllowPaging="false" AllowSorting="false"
                                EmptyDataText='<%$ Resources:Content, GN00001375 %>' AutoGenerateColumns="false">
                                <AlternatingRowStyle CssClass="altRow" />
                                <Columns>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content, GN00001113 %>">
                                        <ItemTemplate>
                                            <asp:Literal ID="Ltrl_DispName" runat="server" Text='<%#Eval("DisplayName")%>'></asp:Literal>
                                            <asp:HiddenField ID="HF_ADUserId" runat="server" Value='<%#Eval("ADUserID")%>' />
                                            <asp:HiddenField ID="HF_Password" runat="server" Value='<%#Eval("Password")%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content, String336 %>">
                                        <ItemTemplate>
                                            <asp:Literal ID="Ltrl_UPN" runat="server" Text='<%#Eval("UPN")%>'></asp:Literal>
                                            <asp:Literal ID="Ltrl_SecondaryEmail" runat="server" Text='<%#Eval("SecondaryEmail")%>' Visible="false"></asp:Literal>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText='<%$ Resources:Content,USM0080 %>'>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="CB_IsSiteAdmin" runat="server" Text=" " Checked='<%# Convert.ToBoolean(Eval("IsSiteAdmin").ToString())%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText='<%$ Resources:Content,USM0079 %>'>
                                        <ItemTemplate>
                                            <asp:DropDownList ID="Ddl_Roles" runat="server"></asp:DropDownList>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content, String389 %>">
                                        <ItemTemplate>
                                            <div class="form-group form-float">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TxBx_SetupEmailTo" runat="server" Text='<%#Eval("SendSetupEmailTo")%>'></asp:TextBox>
                                                </div>
                                            </div>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content, GN0000360 %>">
                                        <ItemTemplate>
                                            <asp:LinkButton CssClass="btn btn-primary waves-effect btnAction" CommandArgument='<%#Eval("RowId") %>'
                                                ID="LB_Remove" CommandName="RemoveUser" runat="server" Text="<%$ Resources:Content,GN0000278%>" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </EM:MPGridView>
                        </div>
                    </div>

                    <%--<div class="row">
                        <div class="col-sm-4 col-xs-12">
                            <asp:Literal ID="Literal20" EnableViewState="false" runat="server" Text="<%$ Resources:Content,Lync048%>" />:
                        </div>
                        <div class="col-sm-3 col-xs-12">
                            <asp:CheckBox ID="CB_SetupEmail" runat="server" Text=" " Checked="true" />
                        </div>
                    </div>--%>
                    <div class="row">
                        <div class="col-sm-3 col-xs-12">
                            <asp:Button ID="Btn_BulkSave" runat="server" CausesValidation="false" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,GN0000281%>" />
                            <asp:Button ID="Btn_BulkCancel" runat="server" CausesValidation="false" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000572%>" />
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>

</asp:Panel>

<asp:Panel ID="pnl_BulkUserLog" runat="server" Style="display: none">
    <table class="tblNewListing" cellpadding="0" cellspacing="0">
        <tr>
            <td class="Heading">
                <asp:Literal
                    ID="Literal88" runat="server" EnableViewState="false" Text="<%$ Resources:Content,SMI0267%>" />
            </td>
        </tr>
    </table>
    <table class="tblNewListing" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <div id="Div_Result" runat="server">
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="Btn_BUserLogClose" runat="server" CausesValidation="false" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN000150%>" />
            </td>
        </tr>
    </table>
</asp:Panel>

<div class="ResourceQuota">
    <asp:Panel ID="Pnl_Resources" CssClass="ResourceQuota-panel" runat="server" BorderColor="ActiveBorder" BorderStyle="Groove" ScrollBars="Auto" Style="display: none">

        <div class="row">
            <div class="col-xs-12">
                <div class="card">

                    <div class="body">
                        <div class="row">
                            <div class="col-xs-12">
                                <asp:Label ID="Lbl_ResourceError" runat="server" ForeColor="red" Font-Bold="true" Visible="false"></asp:Label>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-xs-12">
                                <asp:GridView ID="GV_Resources" runat="server" AllowPaging="true" CssClass="table table-bordered table-striped table-hover"
                                    AutoGenerateColumns="false" EmptyDataText="<%$ Resources:Content,GN00001375%>"
                                    PageSize="500">
                                    <AlternatingRowStyle CssClass="altRow" />
                                    <Columns>
                                        <asp:TemplateField HeaderText="<%$Resources:Content,DEV1008%>">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_ResourceID" runat="server" Text='<%# Eval("ResourceID")%>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$Resources:Content,DEV1002%>">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_TotalResources" runat="server" Text='<%# Eval("TotalResources")%>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$Resources:Content,DEV1003%>">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_UsedResources" runat="server" Text='<%# Eval("UsedResources")%>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$Resources:Content,DEV1004%>">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_AvailableResources" runat="server" Text='<%# Eval("AvailableResources")%>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$Resources:Content,DEV1005%>">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_RequestedResources" runat="server" Text='<%# Eval("RequestedResources")%>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-xs-12">
                                <asp:Button ID="Btn_Done" runat="server" Text="<%$ Resources:Content,GN0000858%>" class="btn btn-primary waves-effect" />
                                <asp:Button ID="Btn_Display" class="btn btn-primary waves-effect" runat="server" Style="display: none;" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </asp:Panel>
</div>
<EM:ModalPopupExtender runat="server" ID="MPE_Resource" BackgroundCssClass="modalBackground"
    DropShadow="false" PopupControlID="Pnl_Resources" TargetControlID="Btn_Display"
    OkControlID="Btn_Done">
</EM:ModalPopupExtender>
