<%@ page language="C#" autoeventwireup="true" inherits="Pages_BaseFramework_Configuration_Backup, App_Web_rrg1aila" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" uiculture="auto" meta:resourcekey="PageResource1" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="StockIssueUpdatePanel" runat="server">
        <ContentTemplate>
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont" valign="top" runat="server">
                    <div class="himssuHeader3WireBox">
                        <table width=" 0px" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="167"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="row whiteboxpaddingleft">
                    <div class="himssuHeader1WireBox card card-box">
                        <div class="himsBoxHeader card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText" id="codeHeader">
                                    <header>
                                        <i class="fas fa-info-circle"></i>
                                        Version Info
                                    </header>
                                </div>
                            </div>
                        </div>
                        <div class="himsBoxContent card-body">
                            <div class="contentHolder">
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label runat="server" ID="LicencedLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                    </div>
                                </div>
                                <div class="cBoth">
                                </div>
                                <div class="outerBox pTop5 col-md-3" runat="server" visible="false" id="DatabaseDiv">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="DatabaseNameLabel" runat="server" Text="Database Name" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="DatabaseNameTextBox" runat="server" SkinID="CustomWidthTextBox"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="cBoth">
                                </div>
                                <div class="outerBox pTop5 col-md-3" runat="server" visible="false" id="BackupDiv">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="BackupPathLabel" runat="server" Text="Backup Path" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="BackupPathTextBox" runat="server" SkinID="CustomWidthTextBox"
                                            Text="C:\DatabaseBackUp\"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="cBoth">
                                </div>
                                <div class="alignCenter pTop5" runat="server" visible="false" id="ButtonDiv">
                                    <asp:Button ID="BackupRARButton" runat="server" Text="&#xf1c6; Backup RAR" CssClass="btn-examcommon btn fas" OnClick="BackupRARButton_Click" SkinID="0" />
                                    <asp:Button ID="BackupButton" runat="server" OnClick="BackupButton_Click" SkinID="0" Text="&#xf1c6; Backup" CssClass="btn-examcommon btn fas" />
                                    <asp:Button ID="UpdateButton" runat="Server" OnClick="UpdateButton_Click" SkinID="0" CssClass="btn-update btn fas" Text="&#xf021; Update" />
                                    <asp:Button ID="ResetReportButton" runat="server" OnClick="ResetReportButton_Click" SkinID="0" Text="&#xf15b; Restore Report" CssClass="btn-examcommon btn fas" />
                                    <asp:Button ID="ViewBackupLogButton" runat="server" OnClick="ViewBackupLogButton_Click" SkinID="0" Text="&#xf06e; View Backup Log" CssClass="btn-edit btn fas" />
                                    <asp:Button ID="ViewBackupHistoryLogButton" runat="server" OnClick="ViewBackupHistoryLogButton_Click" SkinID="0" Text="&#xf06e; View Backup History Log" CssClass="btn-edit btn fas" />
                                    <asp:Button ID="ResetButton" runat="server" Text="&#xf0e2; Reset" CssClass="btn-reset btn fas" OnClick="ResetButton_Click" SkinID="0" />
                                </div>
                                <div class="cBoth">
                                </div>
                                <br />
                                <div id="BackupLogGridViewDiv" runat="server" visible="false">
                                    <div class="himssuHeader7WireBox col-md-12">
                                        <div class="himsBoxHeader card-head inner">
                                            <div class="himsBoxTitle" style="width: 100%">
                                                <div class="headerText">
                                                    <div>
                                                        <header>
                                                            <asp:Label ID="GridViewLabel" Text="Backup Log" runat="server" />
                                                        </header>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="himsBoxContent">
                                            <div id="Div4" runat="server" class="table-responsive">
                                                <asp:GridView ID="BackupLogGridView" runat="server" Width="100%" AutoGenerateColumns="False" EmptyDataText="No records found"
                                                    SkinID="" ShowHeader="True" PagerSettings-Visible="false" CssClass="table table-striped table-bordered table-hover">
                                                    <Columns>
                                                        <asp:BoundField HeaderText="Backup Date Time" DataField="BackupDateTime" HeaderStyle-HorizontalAlign="Left" DataFormatString="{0:dd/MM/yyyy hh:mm tt}">
                                                            <ItemStyle Width="20%" />
                                                        </asp:BoundField>

                                                        <asp:BoundField HeaderText="Backup Path" DataField="BackupPath" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemStyle Width="60%" />
                                                        </asp:BoundField>

                                                        <asp:BoundField HeaderText="Version Id" DataField="VersionId" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemStyle Width="20%" />
                                                        </asp:BoundField>
                                                    </Columns>
                                                    <PagerSettings Visible="False" />
                                                </asp:GridView>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
            <div class="spacer">
                <img src="../../../Images/spacer.gif" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--   <script data-main="../../../JavaScript/rjs/encrypt/backup-encrypt" src="../../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/backup")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script type="text/javascript">
        function RedirectToMigration(MigrationUrl) {
            var newTab = window.open(MigrationUrl, '_blank');
            window.location.href = '../../../Pages/BaseFramework/MyDashBoard.aspx';
        }
    </script>
</asp:Content>
