<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="repairquery.aspx.cs" Inherits="Web.wx.show.repairquery" %>

<!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>OA标题页</title>
    <link href="../../css/css.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
    <script type="text/javascript" src="../../css/popcalendar.js"></script>
</head>
<body>
    <form id="fom" runat="server">
        <div id ="main-c-03-right" >
            <table cellpadding="0"; cellspacing ="0"; style =" width :100%;background-image: url('../../css/images/right_top.png'); background-repeat :repeat-x" >
                <tr>
            <td class  ="main-c-03-right02-top">
                	   <!--这里添加页面标题 -->
                      	    维修查询
                      	</td>
                </tr>
            </table>
            <div id="main-c-03-right02-main">
                    <asp:Panel ID="plzong" runat="server"  >
             <div> 维修人员：<asp:DropDownList ID="ddlRepairman" runat="server" AutoPostBack="True" 
                          onselectedindexchanged="btnQuery2_Click">
                      </asp:DropDownList></div>
             <div style ="text-align :left "> <div>
部门：<asp:DropDownList ID="ddlDepartment" runat="server" AutoPostBack="True" 
                  onselectedindexchanged="btnQuery2_Click">
             </asp:DropDownList>&nbsp;人员编号/姓名：<asp:TextBox ID="tbStaff" runat="server" ValidationGroup="checked"></asp:TextBox>
                 &nbsp; 申请日期：<asp:textbox id="date1" runat="server" Width="100px"  
              ToolTip="点击输入框右侧的日期图标选择日期" onclick="popUpCalendar(this,this,'yyyy-mm-dd')"></asp:textbox>
                                 
                 &nbsp;至 <asp:textbox id="date2" runat="server" Width="100px"    
              ToolTip="点击输入框右侧的日期图标选择日期" onclick="popUpCalendar(this,this,'yyyy-mm-dd')"></asp:textbox>
                                                          
       &nbsp;&nbsp;<asp:Button ID="btQuery2" runat="server" onclick="btnQuery2_Click" 
                  Text="查询" ValidationGroup="cha" />
          
              <asp:RequiredFieldValidator ID="RequiredFieldValidator1" 
                  runat="server" ControlToValidate="date1" Display="Dynamic" 
                  ErrorMessage="起始日期必填！" ValidationGroup="cha" ForeColor="Red"></asp:RequiredFieldValidator>
              <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                  ControlToValidate="date2" Display="Dynamic" ErrorMessage="终止日期必填！" 
                          ValidationGroup="cha" ForeColor="Red"></asp:RequiredFieldValidator>
              <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                  ControlToValidate="date1" Display="Dynamic" ErrorMessage="请填正确日期格式：如2001-01-01" 
                  ValidationExpression="\d{4}-\d{2}-\d{2}" ValidationGroup="cha" 
                  ForeColor="Red"></asp:RegularExpressionValidator>
              <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
                  ControlToValidate="date2" Display="Dynamic" ErrorMessage="请填正确日期格式：如2001-01-01" 
                  ValidationExpression="\d{4}-\d{2}-\d{2}" ValidationGroup="cha" 
                  ForeColor="Red"></asp:RegularExpressionValidator>
           <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
            ControlToValidate="tbStaff" Display="Dynamic" ErrorMessage="输入的人员编号或姓名不对！" 
            ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{0,25}$" 
                 ValidationGroup="num2" ForeColor="Red"></asp:RegularExpressionValidator>
                 </div>  </div> 
<!--栏目开始 -->

            
            <!--这里添加内容 -->

            				    <asp:Label ID="lbMessage" runat="server" ForeColor="Red"></asp:Label>  
			<asp:GridView ID="GridView1" runat="server" Width="100%" 
                BorderWidth="1px" CssClass="gv" AutoGenerateColumns="False" OnSelectedIndexChanging="GridView1_SelectedIndexChanging" OnRowDataBound="GridView1_RowDataBound" OnRowCreated="GridView1_RowCreated" >
            <RowStyle BorderWidth="1px" CssClass="gvrow" />
                  <Columns>
                    <asp:BoundField DataField="id" HeaderText="报修编号" ReadOnly="True" />
                    <asp:BoundField DataField="staffid" HeaderText="申报人编号" ReadOnly="True" />
                    <asp:BoundField DataField="staff" HeaderText="姓名" ReadOnly="True" />
                    <asp:BoundField DataField="department" HeaderText="部门" ReadOnly="True" />
                    <asp:BoundField DataField="reportdate" HeaderText="提交时间" ReadOnly="True" />
                   <asp:TemplateField HeaderText="问题" ShowHeader="False">
                   <ItemTemplate>
                       <asp:LinkButton ID="LinkButton_Trouble" runat="server" CausesValidation="False" 
                            CommandName="Select" Text='<%# Bind("trouble") %>'></asp:LinkButton>
                                   <asp:Label ID="lb_Trouble" runat="server" Text='<%# Bind("trouble") %>' Visible ="false" ></asp:Label>
                   </ItemTemplate>
                   </asp:TemplateField>
                    <asp:BoundField DataField="repairstate" HeaderText="处理状态" ReadOnly="True" />
                    <asp:BoundField DataField="repairdateend" HeaderText="更新时间" ReadOnly="True" />
                    <asp:BoundField DataField="repairman" HeaderText="更新人" ReadOnly="True" />
                         <asp:BoundField DataField="folder" HeaderText="folder" ReadOnly="True" NullDisplayText=" "/>
                          <asp:BoundField DataField="attachment" HeaderText="attachment" ReadOnly="True" NullDisplayText=" "/>    
                </Columns>
            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
        </asp:GridView>
                <div style =" text-align :right ; padding-right:10px">      
                <asp:Button ID="btPrintView" runat="server" Text="打印预览" 
                  onclick="btPrintView_Click" Visible="False"  />
                &nbsp;<asp:Button ID="btExcel" runat="server" onclick="btExcel_Click" 
                    Text="导出到EXCEL" Visible="False" />
            </div>
                
<!--栏目结束 -->
</asp:Panel> 
<asp:Panel ID ="PanelEdit" runat ="server" Visible ="false" >
                      <div  class ="gv2row ">报修编号：<asp:Label ID="lbId" runat="server" ></asp:Label> 报修提交时间：<asp:Label ID="lbDate" runat="server" ></asp:Label></div> 
           <div  class ="gv2row ">报修内容：<asp:Label ID="lbTrouble" runat="server" ></asp:Label> </div>
                        <div>  <asp:Image ID="Imagetitle" runat="server" /></div>
          <asp:DataList ID="DataList1" runat="server" Width="100%" OnItemDataBound="DataList1_ItemDataBound">
                <AlternatingItemStyle CssClass="gv2row_AlternatingItemStyle" />
              <ItemTemplate>
              <div  class ="gv2row ">
                <div>
                    <asp:Label ID="lbDate" runat="server" Text='<%# Bind("repairdate") %>'></asp:Label>&nbsp;
                    <asp:Label ID="Label11" runat="server" Text='<%# Bind("staffname") %>'></asp:Label>：
                    <asp:Label ID="Label13" runat="server" Text='<%# Bind("details") %>'></asp:Label> 
                    <asp:Label ID="folder" Visible ="false"  runat="server" Text='<%# Bind("folder") %>'></asp:Label>
                    <asp:Label ID="attachment" runat="server" Visible ="false"  Text='<%# Bind("attachment") %>'></asp:Label>

                </div> 
                <div>
                    <asp:Image ID="Image1" runat="server" />
                </div>
                </ItemTemplate>
          </asp:DataList>
  &nbsp;<asp:Button ID="btBack" runat="server" onclick="btBack_Click" Text="返回" CausesValidation="False" />
</asp:Panel>

                </div>
            </div>
        </form>
    </body>
</html>
