<%@ Page Title="" Language="C#" MasterPageFile="~/Application.Master" AutoEventWireup="true" CodeBehind="Restore_History_Database.aspx.cs" Inherits="ICDAS_3_0_Web_App.ICDAS_3_0.Administrator.Restore_History_Database" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .hidden {
            display: none;
        }

        .visible {
            display: inline;
        }
    </style>

    <script type="text/javascript">
        var confirmed = false;
        function ConfirmRequest(controlID) {
            if (confirmed) { return true; }

            bootbox.confirm("ARE YOUR SURE YOU WANT TO GENERATE REQUEST?", function (result) {
                if (result) {
                    if (controlID != null) {
                        var controlToClick = document.getElementById(controlID);
                        if (controlToClick != null) {
                            confirmed = true;
                            controlToClick.click();
                            confirmed = false;
                        }
                    }
                }

            });

            return false;

        }

    </script>

    <style type="text/css">
        body {
            margin: 0;
            padding: 0;
            font-family: Arial;
        }

        .loadingmodal {
            position: fixed;
            z-index: 999 !important;
            height: 100%;
            width: 100%;
            top: 0;
            background-color: white;
            filter: alpha(opacity=60);
            opacity: 0.8;
            -moz-opacity: 1;
        }

        .loadingcenter {
            z-index: 1000 !important;
            width: 200px;
            height: 100px;
            position: absolute;
            left: 45%;
            top: 60%;
            margin-left: -150px;
            margin-top: -150px;
            opacity: 1;
            /*-moz-opacity: 1;*/
            background: url("Images/loading.gif") no-repeat;
        }
    </style>


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="upnlwzRestoreHistoryDB">
        <ProgressTemplate>
            <div class="loadingmodal">
                <div class="loadingcenter">
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="upnlwzRestoreHistoryDB" UpdateMode="Always" runat="server">
        <ContentTemplate>
            <div class="row">
                <div class="col-md-12 col-sm-12 col-xs-12">
                    <div class="x_panel">
                        <div class="x_content">
                            <asp:HiddenField ID="hdnRecordId" Value="0" runat="server" />
                            <asp:HiddenField ID="hdnBackupPath" Value="" runat="server" />
                            <div class="x_title">
                                <h4>
                                    <asp:Label ID="lblFormTitle" runat="server"></asp:Label></h4>
                                <div class="clearfix"></div>
                            </div>
                            <div class="col-xs-12 col-sm-12 col-lg-12">
                                <div class="row">
                                    <div class="col-xs-12 col-sm-12 col-lg-4 pull-left">
                                        <h6>
                                            <asp:Label runat="server" ID="lblRestoreHistroyDB" CssClass="text-center"></asp:Label>
                                        </h6>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-xs-12 col-sm-12 col-lg-12">
                                        <img src="Images/database-Restore.gif" class="img-responsive center-block" border="0">
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-xs-12 col-sm-12 col-lg-10" style="padding-top: 10px;">
                                        <asp:Label runat="server" ID="lblNote" CssClass="text-center">NOTE : DEPEND UPON DATABASE SIZE RESTORATION PROCESS WILL TAKE TIME</asp:Label>
                                    </div>
                                    <div class="col-xs-12 col-sm-12 col-lg-2">
                                        <asp:Button CssClass="btn btn-success btn-sm center-block" runat="server" ID="btnGenerateRequest" Text="Generate Request" ToolTip="GENERATE REQUEST" OnClick="btnGenerateRequest_Click" OnClientClick="return ConfirmRequest(this.id);" />
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12 col-sm-12 col-lg-12">
                                <div class="row">
                                    <table id="tblHeader0" runat="server" width="100%" class="table table-bordered dt-responsive nowrap">
                                        <tr>
                                            <td style="width: 30%; text-align: center; background: #b7ecd3;">Write Date Time</td>
                                            <td style="width: 30%; text-align: center; background: #b7ecd3;">Status</td>
                                            <td style="width: 40%; text-align: center; background: #b7ecd3;">Status Description</td>
                                        </tr>
                                        <tr>
                                            <td style="width: 30%; text-align: center">
                                                <asp:Label ID="lblWriteDateTime" runat="server"></asp:Label></td>
                                            <td style="width: 30%; text-align: center">
                                                <asp:Label ID="lblStatus" runat="server"></asp:Label></td>
                                            <td style="width: 40%; text-align: center">
                                                <asp:Label ID="lblStatusDecription" runat="server"></asp:Label></td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <div class="col-xs-12 col-sm-12 col-lg-12" style="text-align: center;">
                                <asp:Button CssClass="btn btn-success btn-sm" runat="server" ID="btnRefresh" Text="Refresh" ToolTip="REFRESH" OnClick="btnRefresh_Click" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
        <Triggers>
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
