BasicImportDB.aspx 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <%@ Page Language="C#" Debug=true AutoEventWireup="true" CodeFile="BasicImportDB.aspx.cs" Inherits="Admin_BasicImportDB" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head id="Head1" runat="server">
  5. <title></title>
  6. <link href="js/tableCSS.css" rel="stylesheet" type="text/css" />
  7. <link href="js/ASPNET2BaseCss.css" rel="stylesheet" type="text/css" />
  8. <link rel="stylesheet" href="css/dataTable.css" media="screen">
  9. <style>
  10. #maindiv,#maindiv1,#maindiv2,#maindiv3{
  11. width:98%;
  12. height:auto;
  13. border:#06F 1px groove;
  14. margin:0 auto;
  15. margin-top:10px;
  16. border-radius:15px;
  17. box-shadow:#CCC 6px 6px;
  18. padding:10px;
  19. font-size:12px;
  20. background-color:White;
  21. }
  22. #menu1{
  23. background-color:#E7F4F8;
  24. border:#03C 1px dotted;
  25. border-radius:8px;
  26. color:White;
  27. padding:3px;
  28. box-shadow:#859CAD 4px 4px;
  29. text-align:left;
  30. color:#333399;
  31. }
  32. #stNav,#stNav1,#stNav2,#stNav3
  33. {
  34. padding:5px;
  35. margin-top:6px;
  36. background-color:#F8FBFC;
  37. text-align:center;
  38. border:#F00 1px thick;
  39. box-shadow:#859CAD 3px 3px;
  40. border-radius:10px;
  41. }
  42. table
  43. {box-shadow:#859CAD 3px 3px;
  44. border-radius:10px;
  45. }
  46. td
  47. {
  48. padding:5px;
  49. }
  50. input,select
  51. { padding:5px;
  52. }
  53. h3
  54. {
  55. color:Gray;
  56. }
  57. #CheckBoxList1
  58. {color:Blue;
  59. }
  60. </style>
  61. </head>
  62. <body>
  63. <form id="form1" runat="server">
  64. <asp:Panel ID="Panel1" runat="server">
  65. <div id="maindiv"><div id="stNav">
  66. <h3> 第一步:选择要导入的Excel文件</h3><br />
  67. <asp:FileUpload ID="File1" runat="server" c="" Height="30px" Width="242px" />
  68. <asp:Button ID="B1" runat="server" CssClass="Input3" Height="36px" OnClick="input_Click" Text="提交" Width="100px" />
  69. </div></div>
  70. </asp:Panel>
  71. <asp:Panel ID="Panel2" runat="server">
  72. <div id="maindiv1"><div id="stNav1">
  73. <h3> 第二 步:从下面选择要导入数据的表</h3><br /> <center>
  74. 选择你要导入数据存在的EXCEL表名:<asp:DropDownList ID="DropDownList1" runat="server" >
  75. </asp:DropDownList>
  76. <asp:Button ID="Button3" runat="server" OnClick="Button3_Click"
  77. Text="查看要导入的列名(字段名)" Width="230px" />
  78. <h3>
  79. 第三 步: 选择要导入数据的字段名(列名):<br />
  80. <asp:CheckBoxList ID="CheckBoxList1" runat="server"
  81. RepeatDirection="Horizontal">
  82. </asp:CheckBoxList>
  83. </h3>
  84. <asp:Button ID="Button1" runat="server" CssClass="Input3" Height="36px"
  85. OnClick="Button1_Click" Text="查看EXCEL要导入的数据" Visible="False" />
  86. </center>
  87. </div></div>
  88. </asp:Panel>
  89. <asp:Panel ID="Panel3" runat="server">
  90. <div id="maindiv2"><div id="stNav2">
  91. <h3> 第四步: 选择表的数据是:</h3><br />
  92. <asp:Literal ID="Literal1" runat="server"></asp:Literal>
  93. <br />
  94. <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" CssClass="Input3"
  95. Height="36px" Text="上面数据准确无误,点此导入数据" />
  96. </div></div>
  97. </asp:Panel>
  98. <asp:Panel ID="Panel4" runat="server">
  99. <div id="maindiv3"><div id="stNav3">
  100. <h3> 第五步:显示导入结果</h3><br />
  101. <br />
  102. 导入表的最后10条记录是:<br />
  103. <asp:Literal ID="Literal2" runat="server"></asp:Literal>
  104. <br />
  105. <asp:Literal ID="Literal3" runat="server"></asp:Literal>
  106. </div></div>
  107. </asp:Panel>
  108. </form>
  109. </body>
  110. </html>