Exam_GridViewNested.aspx
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:14k
源码类别:

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Exam_GridViewNested.aspx.cs" Inherits="web_data_repair_select_Exam_GridViewNested" %>
  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.   <style type="text/css">
  7.   td,div,a {font-size:12px}
  8.   </style>
  9.   <script type="text/javascript">
  10.   //<![CDATA[
  11.   function ShowHidden(sid,ev)
  12.   {
  13.     ev = ev || window.event;
  14.     var target = ev.target || ev.srcElement;
  15.     var oDiv = document.getElementById("div" + sid);
  16.     oDiv.style.display = oDiv.style.display == "none"?"block":"none";
  17.     target.innerHTML = oDiv.style.display == "none"?"显示":"隐藏";
  18.   }
  19.   //]]>
  20.   </script>
  21. </head>
  22. <body>
  23.   <form id="form1" runat="server">
  24.       &nbsp;<asp:MultiView ID="MultiView2" runat="server" ActiveViewIndex="0">
  25.           <asp:View ID="View2" runat="server">
  26.               &nbsp;<table border="1" width="651">
  27.                   <tr align="left">
  28.                       <td>
  29.                           <span>选择门店</span></td>
  30.                       <td style="width: 286px">
  31.                           <asp:DropDownList ID="dl_company" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1"
  32.                               DataTextField="name" DataValueField="id" Width="198px">
  33.                           </asp:DropDownList>
  34.                           <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:oa1ConnectionString %>"
  35.                               SelectCommand="SELECT id, name FROM OA_DEPARTMENT WHERE (CHARINDEX('店', name) > 0)">
  36.                           </asp:SqlDataSource>
  37.                       </td>
  38.                   </tr>
  39.                   <tr>
  40.                       <td>
  41.                           <span>选择设备类型</span></td>
  42.                       <td>
  43.                           <asp:DropDownList ID="dl_type" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource2"
  44.                               DataTextField="type" DataValueField="type" Width="193px">
  45.                           </asp:DropDownList><br />
  46.                           <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:oa1ConnectionString %>"
  47.                               SelectCommand="SELECT [type] FROM [OA_UNIT_TYPE]"></asp:SqlDataSource>
  48.                       </td>
  49.                       <td>
  50.                           <span>选择设备名称</span>
  51.                       </td>
  52.                       <td>
  53.                           <asp:DropDownList ID="dl_name" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource3"
  54.                               DataTextField="eq_name" DataValueField="eq_name" Width="194px">
  55.                           </asp:DropDownList>
  56.                           <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:oa1ConnectionString %>"
  57.                               SelectCommand="SELECT [eq_name] FROM [OA_UNIT_DETAIL] WHERE ([eq_type] = @eq_type)">
  58.                               <SelectParameters>
  59.                                   <asp:ControlParameter ControlID="dl_type" Name="eq_type" PropertyName="SelectedValue"
  60.                                       Type="String" />
  61.                               </SelectParameters>
  62.                           </asp:SqlDataSource>
  63.                       </td>
  64.                   </tr>
  65.                   <tr align="left">
  66.                       <td>
  67.                           <span>开始时间</span></td>
  68.                       <td style="width: 286px">
  69.                           <span>
  70.                               <asp:TextBox ID="b_time" runat="server" Width="176px"></asp:TextBox>
  71.                               <asp:ImageButton ID="ImageButton2" runat="server" Enabled="true" ImageUrl="~/images/calbtn.gif"
  72.                                   OnClick="ImageButton2_Click" /><br />
  73.                               <asp:Calendar ID="CalBegindate" runat="server" BackColor="White" BorderColor="#999999"
  74.                                   CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
  75.                                   ForeColor="Black" Height="180px" OnSelectionChanged="CalBegindate_SelectionChanged"
  76.                                   Visible="False" Width="200px">
  77.                                   <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
  78.                                   <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
  79.                                   <OtherMonthDayStyle ForeColor="#808080" />
  80.                                   <NextPrevStyle VerticalAlign="Bottom" />
  81.                                   <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
  82.                                   <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
  83.                                   <SelectorStyle BackColor="#CCCCCC" />
  84.                                   <WeekendDayStyle BackColor="#FFFFCC" />
  85.                               </asp:Calendar>
  86.                           </span>
  87.                       </td>
  88.                       <td>
  89.                           <span class="STYLE1">截止时间</span></td>
  90.                       <td style="width: 207px">
  91.                           <span class="STYLE1">
  92.                               <asp:TextBox ID="e_time" runat="server" Width="157px"></asp:TextBox>
  93.                               <asp:ImageButton ID="ImageButton1" runat="server" Enabled="true" ImageUrl="~/images/calbtn.gif"
  94.                                   OnClick="ImageButton1_Click" /><br />
  95.                               <asp:Calendar ID="CalEnddate" runat="server" BackColor="White" BorderColor="#999999"
  96.                                   CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
  97.                                   ForeColor="Black" Height="180px" OnSelectionChanged="CalEnddate_SelectionChanged"
  98.                                   Visible="False" Width="200px">
  99.                                   <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
  100.                                   <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
  101.                                   <OtherMonthDayStyle ForeColor="#808080" />
  102.                                   <NextPrevStyle VerticalAlign="Bottom" />
  103.                                   <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
  104.                                   <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
  105.                                   <SelectorStyle BackColor="#CCCCCC" />
  106.                                   <WeekendDayStyle BackColor="#FFFFCC" />
  107.                               </asp:Calendar>
  108.                           </span>
  109.                       </td>
  110.                   </tr>
  111.                   <tr>
  112.                       <td align="center" colspan="4" style="height: 28px">
  113.                           <asp:Button ID="btn_ok" runat="server" OnClick="btn_ok_Click" Text="提交" />
  114.                       </td>
  115.                   </tr>
  116.               </table>
  117.           </asp:View>
  118.       </asp:MultiView>
  119.       <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
  120.           <asp:View ID="View1" runat="server">
  121.     <asp:GridView ID="MasterGridView" runat="server" AutoGenerateColumns="false" Width="937px"
  122.       BorderWidth="1" OnRowDataBound="MasterGridView_RowDataBound" DataKeyNames="id"
  123.       ShowHeader="false">
  124.       <Columns>
  125.         <asp:TemplateField>
  126.           <ItemTemplate>
  127.             <div style="width: 100%; padding: 2px; font-weight: bold; background-color: #DEDEDE;
  128.               float: left">
  129.               <span style="float: left">部门:<%#Eval("name") %></span><br /><span style="float: left">合计:<%#Eval("num") %></span><span style="float: right;
  130.                 color: Red; cursor: pointer" onclick="ShowHidden('<%#Eval("id") %>',event)">隐藏</span></div>
  131.             <div style="background-color: #FFF; padding-left: 60px;clear:both" id="div<%#Eval("id") %>">
  132.               <asp:GridView ID="DetailGridView" runat="server" AutoGenerateColumns="false" ShowHeader="true"
  133.                 Width="100%" HorizontalAlign="left">
  134.                 <HeaderStyle BackColor="#9999FF" />
  135.                 <Columns>
  136.                    <asp:BoundField HeaderText="申请单号" DataField="form_id" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  137.                    <asp:BoundField HeaderText="申请人" DataField="emp_name" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  138.                    <asp:BoundField HeaderText="设备类型" DataField="eq_type" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  139.                    <asp:BoundField HeaderText="设备名称" DataField="eq_detail" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  140.                    <asp:BoundField HeaderText="维修厂商" DataField="company" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  141.                   <asp:BoundField HeaderText="申请日期" DataField="apply_time" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  142.                     <asp:BoundField HeaderText="问题描述" DataField="content" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  143.                     <asp:BoundField HeaderText="门店确认" DataField="check_md" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  144.                     <asp:BoundField HeaderText="厂商确认" DataField="check_company" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  145.                     <asp:BoundField HeaderText="厂商描述" DataField="comment" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  146.                     <asp:BoundField HeaderText="厂商完工日期" DataField="check_time" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  147.                 </Columns>
  148.               </asp:GridView>
  149.             </div>
  150.           </ItemTemplate>
  151.         </asp:TemplateField>
  152.       </Columns>
  153.     </asp:GridView>
  154.           </asp:View>
  155.           <asp:View ID="View3" runat="server">
  156.               <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" Width="937px"
  157.       BorderWidth="1" OnRowDataBound="GridView1_RowDataBound" DataKeyNames="id"
  158.       ShowHeader="false">
  159.                   <Columns>
  160.                       <asp:TemplateField>
  161.                           <ItemTemplate>
  162.                               <div style="width: 100%; padding: 2px; font-weight: bold; background-color: #DEDEDE;
  163.               float: left">
  164.                                   <span style="float: left">部门:<%#Eval("name") %></span><br /><span style="float: left">合计:<%#Eval("num") %></span><span style="float: right;
  165.                 color: Red; cursor: pointer" onclick="ShowHidden('<%#Eval("id") %>',event)">隐藏</span></div>
  166.                               <div style="background-color: #FFF; padding-left: 60px;clear:both" id="div<%#Eval("id") %>">
  167.                                   <asp:GridView ID="DetailGridView" runat="server" AutoGenerateColumns="false" ShowHeader="true"
  168.                 Width="100%" HorizontalAlign="left">
  169.                                       <HeaderStyle BackColor="#9999FF" />
  170.                                       <Columns>
  171.                                           <asp:BoundField HeaderText="申请单号" DataField="form_id" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  172.                                           <asp:BoundField HeaderText="申请人" DataField="emp_name" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  173.                                           <asp:BoundField HeaderText="设备类型" DataField="eq_type" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  174.                                           <asp:BoundField HeaderText="设备名称" DataField="eq_detail" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  175.                                           <asp:BoundField HeaderText="维修厂商" DataField="company" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  176.                                           <asp:BoundField HeaderText="申请日期" DataField="apply_time" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  177.                                           <asp:BoundField HeaderText="问题描述" DataField="content" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  178.                                           <asp:BoundField HeaderText="门店确认" DataField="check_md" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  179.                                           <asp:BoundField HeaderText="厂商确认" DataField="check_company" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  180.                                           <asp:BoundField HeaderText="厂商描述" DataField="comment" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  181.                                           <asp:BoundField HeaderText="厂商完工日期" DataField="check_time" HtmlEncode="false"  ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
  182.                                       </Columns>
  183.                                   </asp:GridView>
  184.                               </div>
  185.                           </ItemTemplate>
  186.                       </asp:TemplateField>
  187.                   </Columns>
  188.               </asp:GridView>
  189.           </asp:View>
  190.       </asp:MultiView>
  191.   </form>
  192. </body>
  193. </html>