Exam_GridViewNested.aspx
资源名称:web.rar [点击查看]
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:14k
源码类别:
OA系统
开发平台:
ASP/ASPX
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Exam_GridViewNested.aspx.cs" Inherits="web_data_repair_select_Exam_GridViewNested" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head id="Head1" runat="server">
- <title></title>
- <style type="text/css">
- td,div,a {font-size:12px}
- </style>
- <script type="text/javascript">
- //<![CDATA[
- function ShowHidden(sid,ev)
- {
- ev = ev || window.event;
- var target = ev.target || ev.srcElement;
- var oDiv = document.getElementById("div" + sid);
- oDiv.style.display = oDiv.style.display == "none"?"block":"none";
- target.innerHTML = oDiv.style.display == "none"?"显示":"隐藏";
- }
- //]]>
- </script>
- </head>
- <body>
- <form id="form1" runat="server">
- <asp:MultiView ID="MultiView2" runat="server" ActiveViewIndex="0">
- <asp:View ID="View2" runat="server">
- <table border="1" width="651">
- <tr align="left">
- <td>
- <span>选择门店</span></td>
- <td style="width: 286px">
- <asp:DropDownList ID="dl_company" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1"
- DataTextField="name" DataValueField="id" Width="198px">
- </asp:DropDownList>
- <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:oa1ConnectionString %>"
- SelectCommand="SELECT id, name FROM OA_DEPARTMENT WHERE (CHARINDEX('店', name) > 0)">
- </asp:SqlDataSource>
- </td>
- </tr>
- <tr>
- <td>
- <span>选择设备类型</span></td>
- <td>
- <asp:DropDownList ID="dl_type" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource2"
- DataTextField="type" DataValueField="type" Width="193px">
- </asp:DropDownList><br />
- <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:oa1ConnectionString %>"
- SelectCommand="SELECT [type] FROM [OA_UNIT_TYPE]"></asp:SqlDataSource>
- </td>
- <td>
- <span>选择设备名称</span>
- </td>
- <td>
- <asp:DropDownList ID="dl_name" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource3"
- DataTextField="eq_name" DataValueField="eq_name" Width="194px">
- </asp:DropDownList>
- <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:oa1ConnectionString %>"
- SelectCommand="SELECT [eq_name] FROM [OA_UNIT_DETAIL] WHERE ([eq_type] = @eq_type)">
- <SelectParameters>
- <asp:ControlParameter ControlID="dl_type" Name="eq_type" PropertyName="SelectedValue"
- Type="String" />
- </SelectParameters>
- </asp:SqlDataSource>
- </td>
- </tr>
- <tr align="left">
- <td>
- <span>开始时间</span></td>
- <td style="width: 286px">
- <span>
- <asp:TextBox ID="b_time" runat="server" Width="176px"></asp:TextBox>
- <asp:ImageButton ID="ImageButton2" runat="server" Enabled="true" ImageUrl="~/images/calbtn.gif"
- OnClick="ImageButton2_Click" /><br />
- <asp:Calendar ID="CalBegindate" runat="server" BackColor="White" BorderColor="#999999"
- CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
- ForeColor="Black" Height="180px" OnSelectionChanged="CalBegindate_SelectionChanged"
- Visible="False" Width="200px">
- <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
- <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
- <OtherMonthDayStyle ForeColor="#808080" />
- <NextPrevStyle VerticalAlign="Bottom" />
- <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
- <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
- <SelectorStyle BackColor="#CCCCCC" />
- <WeekendDayStyle BackColor="#FFFFCC" />
- </asp:Calendar>
- </span>
- </td>
- <td>
- <span class="STYLE1">截止时间</span></td>
- <td style="width: 207px">
- <span class="STYLE1">
- <asp:TextBox ID="e_time" runat="server" Width="157px"></asp:TextBox>
- <asp:ImageButton ID="ImageButton1" runat="server" Enabled="true" ImageUrl="~/images/calbtn.gif"
- OnClick="ImageButton1_Click" /><br />
- <asp:Calendar ID="CalEnddate" runat="server" BackColor="White" BorderColor="#999999"
- CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
- ForeColor="Black" Height="180px" OnSelectionChanged="CalEnddate_SelectionChanged"
- Visible="False" Width="200px">
- <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
- <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
- <OtherMonthDayStyle ForeColor="#808080" />
- <NextPrevStyle VerticalAlign="Bottom" />
- <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
- <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
- <SelectorStyle BackColor="#CCCCCC" />
- <WeekendDayStyle BackColor="#FFFFCC" />
- </asp:Calendar>
- </span>
- </td>
- </tr>
- <tr>
- <td align="center" colspan="4" style="height: 28px">
- <asp:Button ID="btn_ok" runat="server" OnClick="btn_ok_Click" Text="提交" />
- </td>
- </tr>
- </table>
- </asp:View>
- </asp:MultiView>
- <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
- <asp:View ID="View1" runat="server">
- <asp:GridView ID="MasterGridView" runat="server" AutoGenerateColumns="false" Width="937px"
- BorderWidth="1" OnRowDataBound="MasterGridView_RowDataBound" DataKeyNames="id"
- ShowHeader="false">
- <Columns>
- <asp:TemplateField>
- <ItemTemplate>
- <div style="width: 100%; padding: 2px; font-weight: bold; background-color: #DEDEDE;
- float: left">
- <span style="float: left">部门:<%#Eval("name") %></span><br /><span style="float: left">合计:<%#Eval("num") %></span><span style="float: right;
- color: Red; cursor: pointer" onclick="ShowHidden('<%#Eval("id") %>',event)">隐藏</span></div>
- <div style="background-color: #FFF; padding-left: 60px;clear:both" id="div<%#Eval("id") %>">
- <asp:GridView ID="DetailGridView" runat="server" AutoGenerateColumns="false" ShowHeader="true"
- Width="100%" HorizontalAlign="left">
- <HeaderStyle BackColor="#9999FF" />
- <Columns>
- <asp:BoundField HeaderText="申请单号" DataField="form_id" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="申请人" DataField="emp_name" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="设备类型" DataField="eq_type" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="设备名称" DataField="eq_detail" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="维修厂商" DataField="company" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="申请日期" DataField="apply_time" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="问题描述" DataField="content" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="门店确认" DataField="check_md" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="厂商确认" DataField="check_company" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="厂商描述" DataField="comment" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="厂商完工日期" DataField="check_time" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- </Columns>
- </asp:GridView>
- </div>
- </ItemTemplate>
- </asp:TemplateField>
- </Columns>
- </asp:GridView>
- </asp:View>
- <asp:View ID="View3" runat="server">
- <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" Width="937px"
- BorderWidth="1" OnRowDataBound="GridView1_RowDataBound" DataKeyNames="id"
- ShowHeader="false">
- <Columns>
- <asp:TemplateField>
- <ItemTemplate>
- <div style="width: 100%; padding: 2px; font-weight: bold; background-color: #DEDEDE;
- float: left">
- <span style="float: left">部门:<%#Eval("name") %></span><br /><span style="float: left">合计:<%#Eval("num") %></span><span style="float: right;
- color: Red; cursor: pointer" onclick="ShowHidden('<%#Eval("id") %>',event)">隐藏</span></div>
- <div style="background-color: #FFF; padding-left: 60px;clear:both" id="div<%#Eval("id") %>">
- <asp:GridView ID="DetailGridView" runat="server" AutoGenerateColumns="false" ShowHeader="true"
- Width="100%" HorizontalAlign="left">
- <HeaderStyle BackColor="#9999FF" />
- <Columns>
- <asp:BoundField HeaderText="申请单号" DataField="form_id" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="申请人" DataField="emp_name" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="设备类型" DataField="eq_type" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="设备名称" DataField="eq_detail" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="维修厂商" DataField="company" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="申请日期" DataField="apply_time" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="问题描述" DataField="content" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="门店确认" DataField="check_md" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="厂商确认" DataField="check_company" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="厂商描述" DataField="comment" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- <asp:BoundField HeaderText="厂商完工日期" DataField="check_time" HtmlEncode="false" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
- </Columns>
- </asp:GridView>
- </div>
- </ItemTemplate>
- </asp:TemplateField>
- </Columns>
- </asp:GridView>
- </asp:View>
- </asp:MultiView>
- </form>
- </body>
- </html>