<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaintenanceAdd.aspx.cs" Inherits="Web.cg.show.maintenance.MaintenanceAdd" %>

<!DOCTYPE html>

<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" />
     <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" Visible="true">   
<!--栏目开始 -->
            <!--这里添加内容 -->
      <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                            BorderWidth="1px" CssClass="gv" 
                            
          onselectedindexchanging="GridView1_SelectedIndexChanging" Width="100%" >
                            <RowStyle BorderWidth="1px" CssClass="gvrow" />
                            <Columns>
                                  <asp:BoundField DataField="appiouid" HeaderText="申请编号" ReadOnly="True" />
                          
                    <asp:TemplateField HeaderText="项目名称(点击查看)" ShowHeader="False">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbtTitle" runat="server" CausesValidation="False" 
                            CommandName="Select" Text='<%# Bind("title") %>'></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                                 <asp:BoundField DataField="maintenanceenddate" HeaderText="到期日期" ReadOnly="True" />
                                 <asp:BoundField DataField="maintenancecom" HeaderText="维保单位" ReadOnly="True" />
                                 <asp:BoundField DataField="maintenancecontacts" HeaderText="联系人" ReadOnly="True" />
                                 <asp:BoundField DataField="maintenancetel" HeaderText="电话" ReadOnly="True" />
                                 <asp:BoundField DataField="state" HeaderText="状态" ReadOnly="True" />
                                 <asp:HyperLinkField  DataNavigateUrlFields = " appiouid "  DataNavigateUrlFormatString="Maintenance.aspx?iouid={0}" HeaderText="操作" Text="维保记录" />
                            </Columns>
                            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
                        </asp:GridView>
      <asp:Panel ID="plAdd" runat="server">
   <div  class ="td10">
                项目：<asp:DropDownList ID="ddlApp" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="ddlApp_SelectedIndexChanged">
                </asp:DropDownList>
            </div>
            <table  style =" width :100%" border = "1" class ="table " cellpadding ="0" cellspacing ="0">
                <tr>
                    <td class="tabletd_right " style="width:80px">
                        维保单位</td>
                    <td class="tabletd_left ">
                        <asp:TextBox ID="tbMaintenanceCom" runat="server" MaxLength="25" Width="500px"></asp:TextBox>
                        <span style="color :Red ">（必填）</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" 
                            ControlToValidate="tbMaintenanceCom" Display="Dynamic" ErrorMessage="维保单位名称不能为空。" 
                            ForeColor="Red" ValidationGroup="Add"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class ="tabletd_right ">
                        维保期</td>
                      <td class="tabletd_left ">
                        <asp:TextBox ID="tbMaintenanceEnddate" runat="server" 
                            onclick="popUpCalendar(this,this,'yyyy-mm-dd')"  
                            Width="100px"></asp:TextBox>
                          格式：2001-01-01<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" 
                            ControlToValidate="tbMaintenanceEnddate" Display="Dynamic" ErrorMessage="日期不能为空。" 
                            ForeColor="Red" ValidationGroup="Add"></asp:RequiredFieldValidator>
                          <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
                  ControlToValidate="tbMaintenanceEnddate" Display="Dynamic" ErrorMessage="请填正确日期格式：如2001-01-01" 
                  ValidationExpression="\d{4}-\d{2}-\d{2}" ValidationGroup="Add" 
                  ForeColor="Red"></asp:RegularExpressionValidator>
                    </td>
             
                </tr>

                <tr>
                    <td class="tabletd_right ">
                        维保联系人</td>
                    <td class="tabletd_left ">
                        <asp:TextBox ID="tbMaintenanceContacts" runat="server" MaxLength="25" Width="100px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tabletd_right ">
                        联系电话</td>
                         <td class ="tabletd_left ">
                        <asp:TextBox ID="tbMaintenanceTel" runat="server" MaxLength="25" Width="160px"></asp:TextBox>
                    </td>
                </tr>

                </table>
             <div class = "td10"  style = " text-align :center ">
                        <asp:Button ID="btAdd" runat="server" onclick="btAdd_Click" 
                            Text="提交" ValidationGroup="Add" />
                    </div> 
          </asp:Panel>   
            



<!--栏目结束 -->
</asp:Panel> 

   <asp:Panel ID="plUP" runat="server" Visible ="false" >
<table  style =" width :100%" border = "1" class ="table " cellpadding ="0" cellspacing ="0">
              
             
                <tr>
                    <td class="tabletd_center " style="width:80px">
                        申请编号</td>
                    <td class="tabletd_left ">
                        <asp:Label ID="lbappiouid" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                     <td class="tabletd_center " style="width:80px">项目名称</td>
                    <td class="tabletd_left ">
                        <asp:Label ID="lbTitle" runat="server"></asp:Label>
                        </td>
                </tr>
                <tr>
                    <td class="tabletd_center " style="width:80px">维保期</td>
                    <td class="tabletd_left ">

                         <asp:TextBox ID="tbupmaintenanceenddate" runat="server" 
                            onclick="popUpCalendar(this,this,'yyyy-mm-dd')"  
                            Width="100px"></asp:TextBox>
                          格式：2001-01-01<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                            ControlToValidate="tbupmaintenanceenddate" Display="Dynamic" ErrorMessage="日期不能为空。" 
                            ForeColor="Red" ValidationGroup="up"></asp:RequiredFieldValidator>
                          <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                  ControlToValidate="tbupmaintenanceenddate" Display="Dynamic" ErrorMessage="请填正确日期格式：如2001-01-01" 
                  ValidationExpression="\d{4}-\d{2}-\d{2}" ValidationGroup="up" 
                  ForeColor="Red"></asp:RegularExpressionValidator>


                    </td>
                </tr>
                <tr>
                     <td class="tabletd_center " style="width:80px">维保单位</td>
                    <td class="tabletd_left ">
                        <asp:TextBox ID="tbupmaintenancecom" runat="server" MaxLength="25" Width="300px"></asp:TextBox>
  
                    </td>
                </tr>
                <tr>
                    <td class="tabletd_center " style="width:80px">联系人</td>
                    <td class="tabletd_left ">
                        <asp:TextBox ID="tbupmaintenancecontacts" runat="server" MaxLength="25" Width="120px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tabletd_center " style="width:80px">
                        联系电话</td>
                    <td class="tabletd_left ">
                        <asp:TextBox ID="tbupmaintenancetel" runat="server" MaxLength="25" Width="180px"></asp:TextBox>
                      
                    </td>
                </tr>
                <tr>
                    <td class="tabletd_center " style="width:80px">
                        状态</td>
                    <td class="tabletd_left ">
                        <asp:DropDownList ID="ddlState" runat="server">
                            <asp:ListItem Selected="True">维保中</asp:ListItem>
                            <asp:ListItem>完成</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>

                <tr>
                   <td class="tabletd_center " style="width:80px">&nbsp;</td> 
                    <td class="tabletd_left ">
                        <asp:Button ID="btUp" runat="server" onclick="btUp_Click" Text="提交" ValidationGroup="up" />
                    </td>
                </tr>

                </table>
      <div style ="text-align :right ;">
          <asp:Button ID="btBack" runat="server" Text="返回" OnClick="btBack_Click" /></div></asp:Panel>





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


