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

<!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">   
<!--栏目开始 -->
            <!--这里添加内容 -->
         <div  class ="td10">
                 <asp:DropDownList ID="ddlType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="btCha_Click">
                     <asp:ListItem>额度增加</asp:ListItem>
                     <asp:ListItem>额度减少</asp:ListItem>
                     <asp:ListItem Selected="True">所有</asp:ListItem>
               </asp:DropDownList>   &nbsp;&nbsp;<asp:DropDownList ID="ddlState" runat="server" AutoPostBack="True" OnSelectedIndexChanged="btCha_Click">
                  <asp:ListItem>完成</asp:ListItem>   
                  <asp:ListItem >已分配</asp:ListItem>
                  <asp:ListItem Selected="True">所有</asp:ListItem>
               </asp:DropDownList>

               &nbsp;&nbsp;<asp:DropDownList ID="ddlDepartment" runat="server" AutoPostBack="True" OnSelectedIndexChanged="btCha_Click">
                 </asp:DropDownList>
                 &nbsp;&nbsp;<asp:DropDownList ID="ddlDate" runat="server" AutoPostBack="True" onselectedindexchanged="btCha_Click">
                     <asp:ListItem>近一个月</asp:ListItem>
                     <asp:ListItem Selected="True">近三个月</asp:ListItem>
                     <asp:ListItem>近半年</asp:ListItem>
                     <asp:ListItem>近一年</asp:ListItem>
                     <asp:ListItem>所有</asp:ListItem>
                 </asp:DropDownList>
                 &nbsp;<asp:TextBox ID="date1" runat="server" 
                            onclick="popUpCalendar(this,this,'yyyy-mm-dd')" placeholder="点击选择日期"
                            Width="100px"></asp:TextBox>
               &nbsp;~&nbsp;<asp:TextBox ID="date2" runat="server" onclick="popUpCalendar(this,this,'yyyy-mm-dd')" placeholder="点击选择日期" Width="100px"></asp:TextBox>
               &nbsp;<asp:Button ID="btCha" runat="server" Text="查询" OnClick="btCha_Click" />
          </div>
		<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                            BorderWidth="1px" CssClass="gv" 
          onrowdatabound="GridView1_RowDataBound" Width="100%" 
          onselectedindexchanging="GridView1_SelectedIndexChanging" OnRowDeleting="GridView1_RowDeleting">
                            <RowStyle BorderWidth="1px" CssClass="gvrow" />
                            <Columns>
                                <asp:BoundField DataField="id" HeaderText="ID" ReadOnly="True" />
                 <asp:BoundField DataField="quotadate" HeaderText="变动时间" ReadOnly="True" />
                              <asp:BoundField DataField="money" HeaderText="金额" ReadOnly="True" />
                                <asp:BoundField DataField="department" HeaderText="关联机构" ReadOnly="True" />
                              <asp:BoundField DataField="appid" HeaderText="项目编号" ReadOnly="True" />
                               <asp:BoundField DataField="appname" HeaderText="项目名称" ReadOnly="True" />
                              <asp:BoundField DataField="note" HeaderText="说明" ReadOnly="True" />
                                <asp:TemplateField HeaderText="附件">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButton2" runat="server" CommandName ="Delete"  Text='<%# Bind("annex") %>'></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="balance" HeaderText="余额" ReadOnly="True" />
                               <asp:BoundField DataField="state" HeaderText="状态" ReadOnly="True" />
                        <asp:BoundField DataField="manager" HeaderText="办理人" ReadOnly="True" />
                                <asp:TemplateField HeaderText="回收" ShowHeader="False">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Select" Text="回收" onClientClick="return confirm('确认回收吗？')" ></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
                        </asp:GridView>
<!--栏目结束 -->
</asp:Panel> 



            <!--这里添加内容 -->
            <table  style =" width :500px;" border = "1" class ="table " cellpadding ="0" cellspacing ="0">
                <tr>
                    <td  class ="tabletd_right " style ="width:70px" >
                        关联机构</td>
                    <td class ="tabletd_left ">
                        <asp:DropDownList ID="DdlAddDepartment" runat="server">
                 </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class ="tabletd_right ">
                        金额</td>
                    <td class ="tabletd_left ">
                        <asp:TextBox ID="TbMoney" runat="server" ></asp:TextBox>
                        元 &nbsp;
                       额度剩余：<asp:Label ID="LbBalance" runat="server">0</asp:Label>元
&nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator20" runat="server" 
                                                ControlToValidate="TbMoney" 
                        Display="Dynamic" ErrorMessage="请输入数字。"                                                 
                        ValidationExpression="^[+-]?\d+(\.\d+)?$" 
                                                ValidationGroup="Add" ForeColor="Red"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td  class ="tabletd_right ">
                        变动说明</td>
                    <td class ="tabletd_left ">
                        <asp:TextBox ID="tbNote" runat="server" Width="400px"></asp:TextBox>
                             <div>   <asp:RegularExpressionValidator ID="RegularExpressionValidator28" runat="server" 
                                    ControlToValidate="tbNote" Display="Dynamic" ErrorMessage="请输入少于100个字符。" 
                                    ValidationExpression="^[^&gt;&lt;'&amp;*=!&quot;?]{1,100}$" 
                                    ValidationGroup="Add" ForeColor="Red"></asp:RegularExpressionValidator>
</div> 
                      </td>
                </tr>
                <tr>
                    <td class ="tabletd_right ">
                        附件</td>
                    <td class ="tabletd_left ">
                        <asp:FileUpload ID="FileUpload1" runat="server" />
                        <asp:Button ID="btUpload" runat="server" Text="上传" onclick="btUpload_Click" />
                         单个附件不大于50M<div>
                             <asp:Label ID="lbFileNameList" runat="server" Text="已经上传的文件：" Visible="False"></asp:Label>
                            <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click"></asp:LinkButton>
                            <asp:Button ID="btDel" runat="server" Text="删除" OnClick="btDel_Click"  onClientClick="return confirm('确认删除吗？')"  Visible ="false" />
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class ="tabletd_center" colspan="2">
                        <asp:Button ID="btAdd" runat="server" onclick="btAdd_Click"  ValidationGroup="Add" 
                            Text="提交" />
                    </td>
                </tr>
                </table>            
</div>
<!--栏目结束 -->
              
  
            </div> 
        </form>
    </body>
</html>