<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="CSEasyMenuLicense.aspx.vb" Inherits="CSEasyMenu.CSEasyMenuLicense" %>
<%@ register tagprefix="ex" namespace="Exact.Web.UI.Controls" assembly="Exact.Web.UI.Controls" %>

<html>
<head>
	<meta name="save" content="history" />
	<link runat="server" id="ExactCSS" href="Exact.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript">
        var isVisible = false;

        $().ready(function () {
            $('#csUpdate').hide();
        });

        function UpdateOnClick() {
            if (isVisible) {
                SysConfirm(9, null, 'Weet u zeker dat u de licentie wilt bijwerken?', null, null, null, 0, null,
                    function () {
                        if (SysDialog.returnValue == true) {
                            SysSubmit(1);
                        }
                    });
            } else {
                $('#csUpdate').show();
                isVisible = true;
            }
        }
    </script>
</head>
<body>

	<ep:form id="frm" runat="server">
        <ex:CardControl runat="server" ID="Card" Action="Show">

		    <ex:header runat="server" id="hdr" Caption="Easy by DataKings" CaptionID="0" CaptionSuffix=":License" CaptionSuffixID="9749">
                <ex:headerbutton id="hbFavorite" buttonstyle="Favorite" />
            </ex:header>

            <ex:headerproperties runat="server" id="hdrProps" HeaderPropertiesStyle="Custom" />

		    <ex:buttonbar runat="server" id="btnBar">
                <ex:button runat="server" id="btnSave" buttonstyle="Save" OnClick="UpdateOnClick();" Caption="Update license" CaptionID="32394" />
			    <ex:button runat="server" id="btnClose" buttonstyle="Close" />
		    </ex:buttonbar>

            <ex:bcerrormessages runat="server" id="errLicense" Mode="Error" />

            <ex:cardrow runat="server" id="cr">
                <ex:cardcolumn runat="server" id="cc">
                    <ex:cardsection runat="server" id="csCurrent" caption="License" captionid="9749">
                        <ex:CardField runat="server" id="cfAccountCode" caption="Account" captionid="8">
                            <ex:InputField runat="server" id="AccountCode" readonly="True" />
                        </ex:CardField>
                        <ex:CardField runat="server" id="cfLicenseCode" caption="Contract number" captionid="22150">
                            <ex:InputField runat="server" id="LicenseCode" readonly="True" />
                        </ex:CardField>
                        <ex:CardField runat="server" id="cfLicenseName" caption="Name" captionid="206">
                            <ex:InputField runat="server" id="LicenseName" readonly="True" />
                        </ex:CardField>
                        <ex:CardField runat="server" id="cfRequestLicense" caption="" captionid="0">
                            <ex:InputField runat="server" id="RequestLicense" readonly="True" />
                        </ex:CardField>
                    </ex:cardsection>
                </ex:cardcolumn>
            </ex:cardrow>

            <ex:cardrow runat="server" id="crModules">
                <ex:cardcolumn runat="server" id="ccModules">
                    <ex:cardlistview runat="server" id="csModules" ShowHeader="False">
	                    <ex:listview runat="server" id="lvModules" caption="Modules" captionid="16987" showwaitmessage="True" ScrollBar="None" ongetdata="ModulesOnGetData" ShowPageSize="False">
                            <Columns>
                                <ex:listviewcolumn runat="server" id="colDescription" width="40%" caption="Description" captionid="4243" />
                                <ex:listviewcolumn runat="server" id="colStartDate" width="10%" caption="Start date" captionid="3392" />
                                <ex:listviewcolumn runat="server" id="colEndDate" width="10%" caption="End date" captionid="22526" />
                                <ex:listviewcolumn runat="server" id="colActive" width="5%" caption="Active" captionid="2212" />
                                <ex:listviewcolumn runat="server" id="colSpacer" width="35%" caption="" captionid="0" />
                            </Columns>
		                </ex:listview>
		                <ex:bcerrormessages runat="server" id="errNoModules" Mode="Notification" />
                    </ex:cardlistview>
                </ex:cardcolumn>
            </ex:cardrow>

            <ex:cardrow runat="server" id="crUpdate">
                <ex:cardcolumn runat="server" id="ccUpdate">
                    <ex:cardsection runat="server" id="csUpdate" Caption="Update license" CaptionID="32394">
                        <ex:CardField runat="server" ID="cfLicFile" Caption="File" CaptionID="8586" CaptionSuffix=".easy">
                            <input type="file" runat="server" size="80" id="NewLicFile" />
                        </ex:CardField>
                    </ex:cardsection>
                </ex:cardcolumn>
            </ex:cardrow>
        </ex:CardControl>
	    
	</ep:form>

</body>
</html>
