<%@ page language="C#" autoeventwireup="true" inherits="Forms_PackageAssignment, App_Web_3ejnptky" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/New_Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/New_Footer.ascx" TagName="Footer" TagPrefix="uc2" %>

<%--<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2" Namespace="DevExpress.Web.ASPxGridView"
    TagPrefix="dxgv" %>
<%@ Register Assembly="DevExpress.Web.v8.2" Namespace="DevExpress.Web.ASPxRoundPanel"
    TagPrefix="dxrp" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2.Export" Namespace="DevExpress.Web.ASPxGridView.Export"
    TagPrefix="exp" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dxe" %>--%>

<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web" TagPrefix="dxw" %>

<%--********* For Bootstrap Implementation *************--%>
<!DOCTYPE html>
<html lang="en">
<%--********* End of Bootstrap Implementation *************--%>
<head runat="server">
    <title>tSense-IoT Licensing</title>
    <%--********* For Bootstrap Implementation *************--%>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <%--********* End of Bootstrap Implementation *************--%>
    <link id="reset" runat="server" href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link id="stylesheet2" runat="server" href="../css/stylesheet2.css" rel="stylesheet" type="text/css" />
    <link id="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="../js/ui.datepicker.js"></script>
    <script type="text/javascript" src="../js/JQQueryDatePicker.js"></script>
    <link id="uidatepicker" runat="server" type="text/css" href="../css/ui.datepicker.css" rel="stylesheet" />
    <link id="uicore" runat="server" type="text/css" href="../css/ui.core.css" rel="stylesheet" />
    <link id="uitheme" runat="server" type="text/css" href="../css/ui.theme.css" rel="stylesheet" />
    <%--Custom Theme for DevEx 14.2--%>
    <link id="GridView" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/GridView/grid.css" rel="stylesheet" />
    <link id="Editors" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/Editors/styles.css" rel="stylesheet" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />
    <%--********* For Bootstrap Implementation *************--%>
    <link id="BootStrapCss" href="../css/bootstrap.css" runat="server" rel="stylesheet" type="text/css" />
    <link id="mainstyle" runat="server" href="../css/mainstyle.css" rel="stylesheet" type="text/css" />
    <%--********* End of Bootstrap Implementation *************--%>
    <script src="../js/wow.min.js"></script>
</head>
<body>
    <div class="pageContainer">
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <!-- Header Starts Here -->
            <uc1:Header ID="ucHeader" runat="server" />
            <!-- Nav Ends Here -->
            <!-- Content Starts Here -->
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <Triggers>
                    <asp:PostBackTrigger ControlID="btnTest" />
                    <asp:PostBackTrigger ControlID="btnExport" />
                </Triggers>
                <ContentTemplate>
                    <div id="outer">
                        <div id="inner">
                            <div id="float-wrap">
                                <!-- Do not delete 'btnTest' Button -->
                                <asp:Button ID="btnTest" Text="Test" CssClass="ControlHide" runat="server" OnClick="btnTest_Click" />
                                <!-- Main Content Starts Here -->
                                <div id="content">
                                    <div class="content-wrap">
                                        <div id="top-content" class="head-part">
                                            <div id="heading" class="col-sm-4 col-md-3 col-lg-3">
                                                <img class="icon" src="../images/licensing-icon.jpg" alt="" />
                                                <h1>
                                                    <asp:Literal ID="lblPackagingLicenseCaption" runat="server"></asp:Literal>
                                                </h1>
                                                <%--<a href="Dashboard.aspx">Home</a>--%>
                                                <asp:LinkButton ID="lnkHomeCaption" runat="server"></asp:LinkButton>
                                                <span>&gt;</span><span><a href="PackageCreation.aspx">Licensing</a></span>

                                            </div>
                                            <div class="col-sm-8  col-md-9 col-md-9 head-part-btns">
                                                <div class="pull-right">
                                                    <asp:ImageButton ID="btnAssign" ImageUrl="~/images/btn-assign-package.png" runat="server"
                                                        OnClick="btnAssign_Click" />
                                                    &nbsp;                                                                    
                                    <asp:ImageButton ID="btnPackageCreation" ImageUrl="~/images/btn-package-creation.png"
                                        runat="server" PostBackUrl="~/Forms/PackageCreation.aspx" />
                                                </div>
                                            </div>

                                            <div class="clear clearfix">
                                            </div>
                                        </div>
                                        <div class="clear clearfix">
                                        </div>
                                        <asp:Panel ID="pnlAssignPackage" runat="server" Visible="false">
                                            <div class="form-box">
                                                <h1>
                                                    <span class="icon">
                                                        <img src="..\images\icn-package-assignment.gif" title="" /></span>Package Assignment</h1>
                                                <asp:HiddenField ID="hdnSelectedModules" runat="server" />
                                                <div class="form-tbl col-sm-12 nullpadding">
                                                    <div class="form-horizontal">
                                                        <div class="col-sm-6">
                                                            <div class="form-group col-sm-12" style="padding-top: 10px;">
                                                                <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                    <asp:Label ID="lblOrg" runat="server" Text="Organization"></asp:Label>&nbsp;
                                                        <asp:Label ID="Label3" runat="server" ForeColor="Red">*</asp:Label>
                                                                </div>
                                                                <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                    <dxw:ASPxComboBox ID="ddlOrganization" CssClass="form-control" CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" Height="20px"
                                                                        CssPostfix="Office2003_Blue" EnableTheming="true" Theme="Office2003Blue" runat="server" TabIndex="1">
                                                                    </dxw:ASPxComboBox>
                                                                    <asp:Label ID="lblOrganization" runat="server"></asp:Label>
                                                                </div>

                                                            </div>
                                                            <div class="form-group col-sm-12">
                                                                <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                    <asp:Label ID="lblPackage" runat="server" Text="Package"></asp:Label>&nbsp;
                                                        <asp:Label ID="Label14" runat="server" ForeColor="Red">*</asp:Label>
                                                                </div>
                                                                <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                    <dxw:ASPxComboBox ID="ddlPackage" CssClass="form-control" CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" Height="20px"
                                                                        CssPostfix="Office2003_Blue" EnableTheming="true" Theme="Office2003Blue" runat="server" TabIndex="2">
                                                                    </dxw:ASPxComboBox>
                                                                </div>
                                                            </div>
                                                            <div class="form-group col-sm-12">
                                                                <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                    <asp:Label ID="lblPurchasedOn" runat="server" Text="Purchased On"></asp:Label>&nbsp;
                                                        <asp:Label ID="Label2" runat="server" ForeColor="Red">*</asp:Label>
                                                                </div>
                                                                <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                    <asp:TextBox ID="txtPurchasedOn" CssClass="form-control" runat="server" onkeypress="return false;" TabIndex="3"
                                                                        ToolTip="dd/MM/yyyy"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                            <%--  <cc1:CalendarExtender Format="dd/MM/yyyy" runat="server" ID="cePurchasedOn" TargetControlID="txtPurchasedOn"
                                                            PopupButtonID="txtPurchasedOn" CssClass="cal_Theme1">
                                                        </cc1:CalendarExtender>--%>

                                                            <div class="form-group col-sm-12">
                                                                <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                    <asp:Label ID="lblExpiresOn" runat="server" Text="Expires On"></asp:Label>&nbsp;
                                                        <asp:Label ID="Label4" runat="server" ForeColor="Red">*</asp:Label>
                                                                </div>
                                                                <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                    <asp:TextBox ID="txtExpiresOn" CssClass="form-control" runat="server" onkeypress="return false;" TabIndex="4"
                                                                        ToolTip="dd/MM/yyyy"></asp:TextBox>
                                                                    <%-- <cc1:CalendarExtender Format="dd/MM/yyyy" runat="server" ID="ceExpiresOn" TargetControlID="txtExpiresOn"
                                                            PopupButtonID="txtExpiresOn" CssClass="cal_Theme1">
                                                        </cc1:CalendarExtender>--%>
                                                                </div>
                                                            </div>
                                                            <div class="form-group col-sm-12">
                                                                <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                    <asp:Label ID="Label12" runat="server" ForeColor="Red">*</asp:Label>&nbsp;
                                                        <asp:Label ID="lblMandatoryIndication" runat="server">Required Fields</asp:Label>
                                                                </div>
                                                            </div>
                                                            <div class="form-group col-sm-12">
                                                                <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding"></div>
                                                                <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                    <asp:ImageButton ID="ibtnAssignPackage" runat="server" ValidationGroup="vgPackAssign"
                                                                        TabIndex="5" ImageUrl="~/images/btn-save.jpg" OnClick="ibtnAssignPackage_Click"
                                                                        OnClientClick="return ValidatePackageAssignment();" />

                                                                    <asp:ImageButton ID="ibtnCancel" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                                        OnClick="ibtnCancel_Click" TabIndex="6" />
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="clear clearfix">
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                    <div class="clear clearfix">
                                    </div>
                                    <asp:Panel ID="pnlPackageAssignmentList" runat="server">
                                        <div id="grid-dsply">
                                            <div id="top">
                                                <div class="left-col">
                                                </div>
                                                <div class="right-col" align="right">
                                                    <span class="dropdown">
                                                        <dxw:ASPxComboBox ID="ASPxCboExport" runat="server" ValueType="System.String" Width="80px" Height="20px"
                                                            ShowImageInEditBox="false" ItemImage-Height="12px" ClientInstanceName="ASPxCboExport" SelectedIndex="0"
                                                            CssFilePath="~/App_Themes/Office2003 Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                            EnableTheming="true" Theme="Office2003Blue">
                                                            <Items>
                                                                <dxw:ListEditItem ImageUrl="../images/icn-pdf.jpg" Text="pdf" Value="pdf" />
                                                                <dxw:ListEditItem ImageUrl="../images/icn-excel.jpg" Text="xls" Value="xls" />
                                                                <dxw:ListEditItem ImageUrl="../images/icn-word.jpg" Text="rtf" Value="rtf" />
                                                                <%--<dxw:ListEditItem ImageUrl="../images/icn-csv.gif" Text="csv" Value="csv" />--%>
                                                            </Items>
                                                        </dxw:ASPxComboBox>
                                                    </span><span class="txt">
                                                        <asp:ImageButton ID="btnExport" runat="server" ImageUrl="~/images/btn-export.jpg"
                                                            OnClick="btnExport_Click" /></span>
                                                </div>
                                            </div>
                                            <div class="clear clearfix">
                                            </div>
                                            <div class="table-responsive">
                                                <dxw:ASPxGridView ID="gvPackageAssignment" ClientInstanceName="gvPackageAssignment"
                                                    runat="server" Width="100%" KeyFieldName="PackageOrgId" EnableTheming="true" Theme="Office2003Blue"
                                                    CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue">
                                                    <%--<Images ImageFolder="~/App_Themes/Office2003 Blue/{0}/">
                                                <CollapsedButton Height="12px" Url="~/App_Themes/Office2  003 Blue/GridView/gvCollapsedButton.png"
                                                    Width="11px" />
                                                <ExpandedButton Height="12px" Url="~/App_Themes/Office2003 Blue/GridView/gvExpandedButton.png"
                                                    Width="11px" />
                                                <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003 Blue/GridView/gvCollapsedButton.png"
                                                    Width="11px" />
                                                <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003 Blue/GridView/gvExpandedButton.png"
                                                    Width="11px" />
                                            </Images>--%>
                                                    <Styles CssFilePath="~/App_Themes/Office2003 Blue/{0}/grid.css" AlternatingRow-Enabled="True"
                                                        CssPostfix="Office2003_Blue">
                                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                        </Header>
                                                        <LoadingPanel ImageSpacing="10px">
                                                        </LoadingPanel>
                                                        <PagerBottomPanel CssClass="PageFooter">
                                                        </PagerBottomPanel>
                                                        <PagerTopPanel CssClass="PageFooter">
                                                        </PagerTopPanel>
                                                    </Styles>
                                                    <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003 Blue/GridView/pPrev.gif"
                                                        PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003 Blue/GridView/pPrevDisabled.gif"
                                                        NextPageButton-Image-UrlDisabled="../App_Themes/Office2003 Blue/GridView/pNextDisabled.gif"
                                                        NextPageButton-Image-Url="../App_Themes/Office2003 Blue/GridView/pNext.gif" AlwaysShowPager="true">
                                                    </SettingsPager>
                                                    <Columns>
                                                        <dxw:GridViewDataColumn FieldName="PackageOrgId" Caption="PackageOrgId" VisibleIndex="0"
                                                            Visible="false" Width="3%">
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="OrganizationName" Caption="Organization"
                                                            VisibleIndex="1" Width="30%" HeaderStyle-HorizontalAlign="Center" CellStyle-Wrap="True">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img id="imgOrganization" src="../images/icn-organization.gif" alt="" /></span>
                                                                <span class="label">
                                                                    <asp:Label ID="lblOrganization" runat="server" Text="Organization"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <Settings AllowAutoFilter="True" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="PackageName" Caption="Package" VisibleIndex="2"
                                                            HeaderStyle-HorizontalAlign="Center" Width="30%" CellStyle-Wrap="True">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img id="imgPackage" src="../images/icn-package.gif" alt="" /></span> <span class="label">
                                                                        <asp:Label ID="lblPackage" runat="server" Text="Package"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <Settings AllowAutoFilter="True" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="PurchasedOn" Caption="Purchased On" VisibleIndex="3"
                                                            HeaderStyle-HorizontalAlign="Center" Width="15%">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img id="imgPurchasedOn" src="../images/icn-purchased-on.gif" alt="" /></span>
                                                                <span class="label">
                                                                    <asp:Label ID="lblPurchasedOn" runat="server" Text="Purchased On"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbPurchasedOn" runat="server" Text='<%# Eval("PurchasedOn")%>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="ExpiresOn" Caption="Expires On" VisibleIndex="4"
                                                            HeaderStyle-HorizontalAlign="Center" Width="15%" HeaderStyle-VerticalAlign="Middle">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img id="imgExpiresOn" src="../images/icn-expireson.gif" alt="" /></span> <span class="label">
                                                                        <asp:Label ID="lblExpiresOn" runat="server" Text="Expires On"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbExpiresOn" runat="server" Text='<%# Eval("ExpiresOn")%>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Caption="Edit" VisibleIndex="5" HeaderStyle-HorizontalAlign="Center"
                                                            CellStyle-HorizontalAlign="Center" Width="3%">
                                                            <HeaderTemplate>
                                                            </HeaderTemplate>
                                                            <DataItemTemplate>
                                                                <asp:ImageButton ID="btnEdit" runat="server" CommandArgument='<%# Eval("PackageOrgId") %>'
                                                                    AlternateText="Edit" CommandName="Edit" ImageUrl="~/images/icn-edit.gif" ToolTip="Click here to Edit"
                                                                    ImageAlign="Middle" OnClick="btnEdit_click" CssClass="handButton" />
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataColumn FieldName="OrganizationID" Caption="OrganizationID" VisibleIndex="6"
                                                            Visible="false" Width="2%">
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="PackageId" Caption="PackageId" VisibleIndex="7"
                                                            Visible="false" Width="2%">
                                                        </dxw:GridViewDataColumn>
                                                    </Columns>
                                                    <ClientSideEvents EndCallback="function(s, e) {document.getElementById('btnTest').click();}" />
                                                    <Settings ShowFilterRow="true" ShowFilterRowMenu="True" />
                                                    <SettingsText EmptyDataRow="No packages assigned to the organization" />
                                                </dxw:ASPxGridView>
                                            </div>
                                            <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvPackageAssignment"
                                                ReportHeader="{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}}
\viewkind4\uc1\pard\qc\b\fs28 Alert Details    \fs24\par
\pard\par
\par
}
">
                                                <PageFooter Right="[Page # of Pages #]">
                                                </PageFooter>
                                            </dxw:ASPxGridViewExporter>
                                        </div>
                                    </asp:Panel>
                                    <div class="clear clearfix">
                                    </div>
                                </div>
                                <!-- Main Content Ends Here -->
                                <div id="left">
                                </div>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <div id="right">
                            </div>
                            <div class="clear clearfix">
                            </div>
                        </div>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
            <!-- Content Ends Here -->

            <script language="JavaScript1.2" type="text/javascript" src="../js/myformvalidations.js"></script>

            <%-- <script type="text/javascript" src="../js/FormValidations.js"></script>--%>

            <asp:HiddenField ID="hdnLogout" runat="server" />
        </form>
    </div>
    <uc2:Footer ID="Footer1" runat="server" />
</body>
</html>
