<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Admin/AdminMain.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    恢复数据库
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <form action="" method="post">
    <%
        if (Model == null)
        {
            Response.Write("未找到任何备份。");
        }
        else
        {
            if (Model.GetType() == typeof(ArrayList))
            {
                var model = (ArrayList)Model;
                if (model.Count > 0)
                {
                    Response.Write("<select name='filename'>");
                    for (int i = 0; i < model.Count; i++)
                    {
                        Response.Write("<option>" + model[i] + "</option>");
                    }
                    Response.Write("</select>");
                    Response.Write("<input name='optype' type='submit' value='恢复备份'  onclick=\"return confirm('请谨慎，此操作将会覆盖当前数据，继续恢复吗？')\"/>");
                    Response.Write("<input name='optype' type='submit' value='压缩备份' />");
					Response.Write("<input name='optype' type='submit' onclick='return confirm(\"确认删除？\")' value='删除备份' />");
                }
                else
                {
                    Response.Write("未找到任何备份。");
                }
            }
        }
    %>
    </form>
</asp:Content>

