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

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

<%@ Register Src="~/RCC/System/CC/VMCreditLimits.ascx" TagName="CreditLimit" TagPrefix="EM" %>
<asp:Content ID="Content6" ContentPlaceHolderID="CPH_Content" runat="Server">
    <div class="col-xs-12">
        <div class="card">
            <div class="body">
                <EM:TabContainer ID="TC_CreditLimits" runat="server" OnClientActiveTabChanged="loadTabPanel">
                    <EM:TabPanel ID="Tab_Products" runat="server" HeaderText="<%$ Resources:Content,ProductsCreditLimit%>">
                        <ContentTemplate>
                            <asp:Button CssClass="btn btn-primary" ID="Btn_Tab0" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent0" runat="server">
                                <div class="row Div_OpsRow" id="Div_Operations" runat="server">
                                    <div class="col-xs-12">
                                        <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 CssClass="btn btn-primary" class="btn btn-primary waves-effect btnAction" ID="Btn_Export" runat="server" Text="<%$ Resources:Content,strExport%>" />
                                                        <asp:Button CssClass="btn btn-primary" class="btn btn-primary waves-effect btnAction" ID="Btn_Import" runat="server" Text="<%$ Resources:Content,strImport%>" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- Search Panel -->
                                <asp:Panel ID="Pnl_Search" runat="server" DefaultButton="Btn_Search">
                                    <div class="row">
                                        <div class="panel-group search-panel" id="AS_Products" role="tablist" aria-multiselectable="true">
                                            <div class="col-xs-12" role="tab" id="SH_Products">
                                                <div class="card">
                                                    <div class="header" role="button" data-toggle="collapse" data-parent="#AS_Products" href="#<%= CSB_Products.ClientID%>" aria-expanded="true" aria-controls="SH_Products">
                                                        <h3>
                                                            <%= Resources.Content.GN0000395%>
                                                        </h3>
                                                    </div>
                                                    <div id="CSB_Products" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_Products" aria-expanded="false">
                                                        <div class="row">
                                                            <div class="col-md-3 col-sm-6 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:DropDownList ID="DDL_PackageType" runat="server"></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_PackageName" runat="server" />
                                                                        <asp:Label CssClass="form-label" ID="Label2" runat="server" EnableViewState="false" Text="<%$ Resources:Content,PackageName%>"></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="col-md-3 col-sm-6 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:DropDownList ID="DDL_BillingCycle" runat="server" />
                                                                </div>
                                                            </div>
                                                            <div class="col-md-3 col-sm-6 col-xs-12">
                                                                <div class="form-group form-float">
                                                                    <asp:DropDownList ID="DDL_PaymentGroups" runat="server" />
                                                                </div>
                                                            </div>
                                                            <div class="col-md-3 col-sm-6 col-xs-12">
                                                                <div class="form-group form-float">
                                                                    <asp:DropDownList ID="DDl_ProductStatus" runat="server">
                                                                        <asp:ListItem Selected="True" Text='<%$ Resources:Content,SelectStatus  %>' Value="-1"></asp:ListItem>
                                                                        <asp:ListItem Text='<%$ Resources:Content, GN0000935 %>' Value="1"></asp:ListItem>
                                                                        <asp:ListItem Text='<%$ Resources:Content, GN0000936 %>' Value="0"></asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </div>
                                                            </div>
                                                            <div class="col-md-3 col-sm-6 col-xs-12">
                                                                <div class="form-group form-float">
                                                                    <asp:DropDownList ID="DDL_ProductsFor" runat="server">
                                                                        <asp:ListItem Text='<%$ Resources:Content, ProductsFor %>' Value="-1"></asp:ListItem>
                                                                        <asp:ListItem Text='<%$ Resources:Content, SM200001 %>' Value="0" Selected="True"></asp:ListItem>
                                                                        <asp:ListItem Text='<%$ Resources:Content, SMI759 %>' Value="1"></asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </div>
                                                            </div>

                                                            <div class="col-xs-12">
                                                                <div class="form-group form-float">
                                                                    <asp:Button CssClass="btn btn-primary" ID="Btn_Search" SkinID="searchButton" runat="server" Text="<%$ Resources:Content,GN0000391%>" />
                                                                    <asp:Button CssClass="btn btn-primary" ID="Btn_Clear" SkinID="searchButton" Visible="false" runat="server" Text="<%$ Resources:Content,String289 %>" />
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </asp:Panel>
                                <!-- End of Search Panel -->
                                <asp:GridView ID="GV_Products" runat="server" AutoGenerateColumns="False" CssClass="table table-bordered table-striped table-hover table-responsive" EmptyDataText='<%$ Resources:Content, GN00001375  %>'>
                                    <Columns>
                                        <asp:TemplateField HeaderText='<%$ Resources:Content,GN000141 %>'>
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_Package" runat="server"></asp:Label>
                                                <asp:HiddenField ID="Hf_PackageId" runat="server" />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,GN00001473%>" HeaderStyle-CssClass="col-xs-1">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_BillingCycle" runat="server"></asp:Label>
                                                <asp:HiddenField ID="Hf_CycleId" runat="server" />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,CreditLimits%>" HeaderStyle-CssClass="col-xs-3">
                                            <ItemTemplate>
                                                <table class="table small">
                                                    <tbody>

                                                        <tr>
                                                            <td class="col-xs-5 row-label">
                                                                <asp:Label ID="Label15" runat="server"
                                                                    EnableViewState="false" Text='<%$ Resources:Content,GN00001373%>'></asp:Label>:
                                                            </td>
                                                            <td class="col-xs-7">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_CreditLimit" runat="server"></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td class="col-xs-5 row-label">
                                                                <asp:Label ID="Label16" runat="server"
                                                                    EnableViewState="false" Text='<%$ Resources:Content,GN00001027%>'></asp:Label>:
                                                            </td>
                                                            <td class="col-xs-7">
                                                                <div class="form-group">
                                                                    <div class="form-line at-the-rate">
                                                                        <asp:TextBox ID="TxBx_AlertThreshold" runat="server"></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                </table>

                                            </ItemTemplate>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="<%$ Resources:Content,USM0047%>" HeaderStyle-CssClass="col-xs-2">
                                            <ItemTemplate>
                                                <asp:DropDownList ID="Ddl_AlertFrequency" runat="server">
                                                    <asp:ListItem Text="<%$ Resources:Content, DGN1110307%>" Value="1"></asp:ListItem>
                                                    <asp:ListItem Text="<%$ Resources:Content,GN0000912%>" Value="0"></asp:ListItem>
                                                </asp:DropDownList>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,String597%>" HeaderStyle-CssClass="col-xs-3">
                                            <ItemTemplate>
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_EmailTo" runat="server"></asp:TextBox>
                                                    </div>
                                                </div>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>

                                </asp:GridView>

                                <div class="row">
                                    <div class="col-xs-12">
                                        <asp:Button CssClass="btn btn-primary btnAction" ID="Btn_Save" SkinID="searchButton" runat="server" Text="<%$ Resources:Content,Save%>" />
                                    </div>
                                </div>

                                <div id="Div_Import" runat="server" visible="false" class="row">
                                    <div class="col-xs-12">
                                        <div class="card">
                                            <div class="header">
                                                <h3><%= Resources.Content.strImport%>  </h3>
                                            </div>
                                            <div class="body">
                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        *<asp:Literal ID="Literal77" EnableViewState="false" runat="server" Text="<%$ Resources:Content,selectExcelFileToImport%>" />:
                                                    </div>
                                                    <div class="col-sm-8 col-xs-12">
                                                        <div class="form-group">
                                                            <div class="fileupload fileupload-new" data-provides="fileupload">
                                                                <span class="btn btn-primary btn-file"><span class="fileupload-new"><%= Resources.Content.strSelectFile%></span>
                                                                    <span class="fileupload-exists"><%= Resources.Content.GN0000385%></span>
                                                                    <asp:FileUpload ID="FU_Products" runat="server" />
                                                                </span>
                                                                <span class="fileupload-preview"></span>
                                                                <a href="#" class="close fileupload-exists" data-dismiss="fileupload" style="float: none">×</a>
                                                            </div>
                                                            <span><%= Resources.Content.ExportFirst %></span>
                                                        </div>
                                                    </div>


                                                </div>
                                                <div class="row">
                                                    <div class="col-xs-12">
                                                        <asp:Button ID="Btn_Next" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN00001242%>" />
                                                        <asp:Button ID="Btn_ImportCancel" runat="server" CssClass="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000572%>" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>
                    <EM:TabPanel ID="Tab_Subscriptions" runat="server" HeaderText='<%$ Resources:Content, SubscriptionsCreditLimit %>'>
                        <ContentTemplate>
                            <asp:Button CssClass="btn btn-primary" ID="Btn_Tab1" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent1" runat="server" Visible="false">
                                <!-- Operations -->
                                <div class="row Div_OpsRow" id="Div_OperationsSubs" runat="server">
                                    <div class="col-xs-12">
                                        <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 CssClass="btn btn-primary" class="btn btn-primary waves-effect btnAction" ID="Btn_ExportSubs" runat="server" Text="<%$ Resources:Content,strExport%>" />
                                                        <asp:Button CssClass="btn btn-primary" class="btn btn-primary waves-effect btnAction" ID="Btn_ImportSubs" runat="server" Text="<%$ Resources:Content,strImport%>" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- Search Panel -->
                                <asp:Panel ID="Pnl_SearchSubs" runat="server" DefaultButton="Btn_SearchSubs">
                                    <div class="row">
                                        <div class="panel-group search-panel" id="AS_Subs" role="tablist" aria-multiselectable="true">
                                            <div class="col-xs-12" role="tab" id="SH_Subs">
                                                <div class="card">
                                                    <div class="header" role="button" data-toggle="collapse" data-parent="#AS_Subs" href="#<%= CSB_Subs.ClientID%>" aria-expanded="true" aria-controls="SH_Subs">
                                                        <h3>
                                                            <%= Resources.Content.GN0000395%>
                                                        </h3>
                                                    </div>
                                                    <div id="CSB_Subs" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_Subs" aria-expanded="false">
                                                        <div class="row">
                                                            <div class="col-md-3 col-sm-6 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:DropDownList ID="DDL_PackageTypeSubs" runat="server"></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_PackageNameSubs" runat="server" />
                                                                        <asp:Label CssClass="form-label" ID="Label1" runat="server" EnableViewState="false" Text="<%$ Resources:Content,PackageName%>"></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_SubscriptionId" runat="server" />
                                                                        <asp:Label CssClass="form-label" ID="Label3" runat="server" EnableViewState="false" Text="<%$ Resources:Content,SubscriptionId%>"></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="col-md-3 col-sm-6 col-xs-12" id="Div_SubsFor" runat="server">
                                                                <div class="form-group form-float">
                                                                    <asp:DropDownList ID="DDL_SubsFor" runat="server">
                                                                        <asp:ListItem Text='<%$ Resources:Content, ProductsFor %>' Value="-1"></asp:ListItem>
                                                                        <asp:ListItem Text='<%$ Resources:Content, SM200001 %>' Value="0" Selected="True"></asp:ListItem>
                                                                        <asp:ListItem Text='<%$ Resources:Content, SMI759 %>' Value="1"></asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </div>
                                                            </div>

                                                            <div class="col-xs-12">
                                                                <div class="form-group form-float">
                                                                    <asp:Button CssClass="btn btn-primary" ID="Btn_SearchSubs" SkinID="searchButton" runat="server" Text="<%$ Resources:Content,GN0000391%>" />
                                                                    <asp:Button CssClass="btn btn-primary" ID="Btn_ClearSubs" SkinID="searchButton" Visible="false" runat="server" Text="<%$ Resources:Content,String289 %>" />
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </asp:Panel>
                                <!-- End of Search Panel -->

                                <asp:GridView ID="GV_Subs" runat="server" AutoGenerateColumns="False"
                                    CssClass="table table-bordered table-striped table-hover table-responsive"
                                    DataKeyNames="SubscriptionId" AllowPaging="true" EmptyDataText='<%$ Resources:Content, GN00001375  %>'>
                                    <Columns>
                                        <asp:TemplateField HeaderText='<%$ Resources:Content,DGN1119987 %>'>
                                            <ItemTemplate>
                                                <asp:HyperLink ID="Lbl_Subscription" runat="server"></asp:HyperLink>
                                                <asp:HiddenField ID="Hf_SubscriptionId" runat="server" />
                                                <asp:HiddenField ID="Hf_PackageId" runat="server" />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,GN00001473%>" HeaderStyle-CssClass="col-xs-2">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_BillingCycle" runat="server"></asp:Label>
                                                <asp:HiddenField ID="Hf_CycleId" runat="server" />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,CreditLimits%>" HeaderStyle-CssClass="col-xs-3">
                                            <ItemTemplate>
                                                <table class="table small">
                                                    <tbody>

                                                        <tr>
                                                            <td class="col-xs-5 row-label">
                                                                <asp:Label ID="Label15" runat="server"
                                                                    EnableViewState="false" Text='<%$ Resources:Content,GN00001373%>'></asp:Label>:
                                                            </td>
                                                            <td class="col-xs-7">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_CreditLimit" runat="server"></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td class="col-xs-5 row-label">
                                                                <asp:Label ID="Label16" runat="server"
                                                                    EnableViewState="false" Text='<%$ Resources:Content,GN00001027%>'></asp:Label>:
                                                            </td>
                                                            <td class="col-xs-7">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_AlertThreshold" runat="server"></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="<%$ Resources:Content,strLimitUsed%>" HeaderStyle-CssClass="col-xs-2">
                                            <ItemTemplate>
                                                <asp:Label ID="Lbl_CurrentUsed" runat="server" ReadOnly="true"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <%--PagerTemplate Start--%>
                                    <PagerTemplate>
                                        <EM:Pager ID="Pager1" runat="server" />
                                    </PagerTemplate>
                                    <%--PagerTemplate End--%>
                                </asp:GridView>

                                <div class="row">
                                    <div class="col-xs-12">
                                        <asp:Button CssClass="btn btn-primary btnAction" ID="Btn_SaveSubs" SkinID="searchButton" runat="server" Text="<%$ Resources:Content,Save%>" />
                                    </div>
                                </div>

                                <div id="Div_ImportSubs" runat="server" visible="false" class="row">
                                    <div class="col-xs-12">
                                        <div class="card">
                                            <div class="header">
                                                <h3><%= Resources.Content.strImport%>  </h3>
                                            </div>
                                            <div class="body">
                                                <div class="row">
                                                    <div class="col-sm-3 col-xs-12 row-label">
                                                        *<asp:Literal ID="Literal1" EnableViewState="false" runat="server" Text="<%$ Resources:Content,selectExcelFileToImport%>" />:
                                                    </div>
                                                    <div class="col-sm-8 col-xs-12">
                                                        <div class="form-group">
                                                            <div class="fileupload fileupload-new" data-provides="fileupload">
                                                                <span class="btn btn-primary btn-file"><span class="fileupload-new"><%= Resources.Content.strSelectFile%></span>
                                                                    <span class="fileupload-exists"><%= Resources.Content.GN0000385%></span>
                                                                    <asp:FileUpload ID="FU_Subs" runat="server" />
                                                                </span>
                                                                <span class="fileupload-preview"></span>
                                                                <a href="#" class="close fileupload-exists" data-dismiss="fileupload" style="float: none">×</a>
                                                            </div>
                                                            <span><%= Resources.Content.ExportFirst %></span>
                                                        </div>
                                                    </div>


                                                </div>
                                                <div class="row">
                                                    <div class="col-xs-12">
                                                        <asp:Button ID="Btn_NextSubs" runat="server" class="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN00001242%>" />
                                                        <asp:Button ID="Btn_ImportSubsCancel" runat="server" CssClass="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000572%>" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>

                    <EM:TabPanel ID="Tab_VMs" runat="server" HeaderText='<%$ Resources:Content, VMsCreditLimit %>'>
                        <ContentTemplate>
                            <asp:Button CssClass="btn btn-primary" ID="Btn_Tab2" runat="server" Style="display: none;" />
                            <asp:Panel ID="Pnl_TabContent2" runat="server" Visible="false">
                               
                                    
                                        <EM:CreditLimit ID="UCCreditLimit" runat="server" />
                              
                            </asp:Panel>
                        </ContentTemplate>
                    </EM:TabPanel>
                </EM:TabContainer>
            </div>
        </div>
    </div>
</asp:Content>
