default.aspx
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:8k
源码类别:

.net编程

开发平台:

C#

  1. <%@ page language="C#" autoeventwireup="true" inherits="MatCode_default, App_Web_tiipho30" theme="Normal" %>
  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 runat="server">
  5. <link href="../style/gridstyle.css" rel="stylesheet" type="text/css" />
  6.     <title>芜湖供电系统工程项目管理子系统</title>
  7. <script type="text/javascript">
  8.   
  9.     function modelesswin(url,mwidth,mheight)
  10.      {
  11.         if (document.all&&window.print) 
  12.          window.showModalDialog(url,"","help:0;dialogWidth:"+mwidth+"px;dialogHeight:"+mheight+"px;status=no,scoll=no;");
  13.          window.location.replace(window.location.href);          
  14.      }  
  15.    
  16.     </script> 
  17. </head>
  18. <body>
  19.     <form id="form1" runat="server">
  20.     
  21.      <TABLE width="100%" border="0" cellPadding="0" cellSpacing="0" >
  22.        <tr>
  23.           <td bgColor="#f7f7f7" width="100%" height="25px">
  24.              <strong>&nbsp;&nbsp;    物 资 代 码 管 理   </strong>
  25.            </td>
  26.        </tr>
  27.        <tr>
  28.          <td background="../../Images/toolbarbg.jpg" height="25">
  29.             <img src="../../Images/add.gif" height="15" align="absmiddle">
  30.             
  31.             <a href="javascript: modelesswin('MatCodeAdd.aspx',500,300)">新建物资代码</a> &nbsp; &nbsp;<a href="javascript: modelesswin('MatCodeIn.aspx',650,400)">数据导入</a></td> 
  32.        </tr>
  33.         <tr>
  34.          <td valign="bottom">  
  35.              <asp:DropDownList ID="DDL_Condition" runat="server" Width="100px">
  36.                 <asp:ListItem Value="1" Text="物资代码"></asp:ListItem>
  37.                 <asp:ListItem Value="2" Text="物资代码名称"></asp:ListItem>                
  38.              </asp:DropDownList>
  39.              &nbsp;
  40.              <asp:TextBox ID="TB_Condition" runat="server" Width="250px"></asp:TextBox>
  41.              &nbsp;
  42.             
  43.              <asp:ImageButton ID="IB_Search"  ImageUrl="~/Images/Search.gif" ToolTip=" 查找"   runat="server"   OnClick="IB_Search_Click" />
  44.          </td> 
  45.        </tr>
  46.        <tr>
  47.         <td width="100%" valign="top">
  48.              <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" DataKeyNames="ID"  OnRowDataBound="GridView1_RowDataBound" Width="100%" 
  49.                         OnRowDeleting="GridView1_RowDeleting"  OnRowEditing="GridView1_RowEditing"  CellSpacing="1" CellPadding="0" BackColor="#CDCDCF"
  50.                        BorderWidth="0px" CssClass="Grid" SelectedRowStyle-CssClass="SelectedRow" HeaderStyle-CssClass="GridHeader" RowStyle-CssClass="HeadingCellText" 
  51.   FooterStyle-CssClass="GridFooter" ShowFooter="True" OnPageIndexChanging="GridView1_PageIndexChanging"   AllowPaging="True" AllowSorting="True"
  52.                         PageSize="10" OnSorting="GridView1_Sorting">
  53.                         <AlternatingRowStyle BackColor="#F0F0F0" />
  54.         <RowStyle Height="25px" BackColor="#F9FAFC" CssClass="HeadingCellText" />
  55.         <HeaderStyle Height="25px" BackColor="#DFDFDF" CssClass="GridHeader" />
  56.                                <Columns>
  57.                                         <asp:BoundField DataField="MatCode" HeaderText="物资代码">
  58.                                            <HeaderStyle Width="20%"/>
  59.                                         </asp:BoundField>
  60.                                         <asp:BoundField DataField="MatName" HeaderText="物资代码名称">
  61.                                             <HeaderStyle Width="20%"/>
  62.                                         </asp:BoundField> 
  63.                                         <asp:BoundField DataField="MatDecs" HeaderText="物资代码描述">
  64.                                             <HeaderStyle Width="20%" />
  65.                                         </asp:BoundField>                                        
  66.                                         <asp:TemplateField HeaderText="操 作">
  67.                                             <ItemTemplate>
  68.                                             &nbsp; &nbsp; &nbsp; &nbsp; <asp:ImageButton ID="IB_Edit" ToolTip="编辑" runat="server" CommandName="edit" ImageUrl="~/Images/s_edit.gif"/> &nbsp; &nbsp;&nbsp; &nbsp;
  69.                                                 <asp:ImageButton ToolTip="删除" ID="IB_Del" runat="server" CommandName="Delete" ImageUrl="~/Images/s-del.gif"
  70.                                                     OnClientClick='<%#"return confirm("确认删除物资代码为『"+Eval("MatCode")+"』的记录吗?");" %>'/>                                                                                        
  71.                                             </ItemTemplate>
  72.                                             <HeaderStyle Width="15%" HorizontalAlign="Center"/>
  73.                                             <ItemStyle HorizontalAlign="Left"  BorderWidth="0px"/>
  74.                                         </asp:TemplateField>
  75.                                        
  76.                                     </Columns>
  77.                                   <FooterStyle CssClass="GridFooter" />
  78.             <PagerStyle CssClass="GridPage" />
  79.                         <PagerTemplate>
  80.                         <asp:Label  ID="LabelCurrentPage" runat="server">当前页:<%# ((GridView)Container.NamingContainer).PageIndex + 1 %></asp:Label>&nbsp; &nbsp;
  81.                         <asp:Label ID="LabelPageCount" runat="server" >总页数:<%# ((GridView)Container.NamingContainer).PageCount %></asp:Label>&nbsp; &nbsp;
  82.                         <asp:LinkButton ID="LinkButtonFirstPage" runat="server" CommandArgument="First" CommandName="Page" Enable="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>">首页</asp:LinkButton>&nbsp; &nbsp;
  83.                         <asp:LinkButton ID="LinkButtonPreviousPage" runat="server" CommandArgument="Prev" CommandName="Page" Enable="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>">上一页</asp:LinkButton>&nbsp; &nbsp;
  84.                         <asp:LinkButton ID="LinkButtonNextPage" runat="server" CommandArgument="Next" CommandName="Page" Enable="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>">下一页</asp:LinkButton>&nbsp; &nbsp;
  85.                         <asp:LinkButton ID="LinkButtonLastPage" runat="server" CommandArgument="Last" CommandName="Page" Enable="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>">尾页</asp:LinkButton>&nbsp; &nbsp;
  86.                         转到第:<asp:TextBox ID="LinkTextBoxNewPage" runat="server" Width="20px" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1 %>'></asp:TextBox>页&nbsp; &nbsp;
  87.                         <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="0-99999" ValidationGroup="goto" ControlToValidate="LinkTextBoxNewPage"
  88.                         MaximumValue="99999" MinimumValue="0" Display="Dynamic" ></asp:RangeValidator>
  89.                         <asp:linkbutton id="btnGo" runat="server" causesvalidation="False" commandargument="-1" commandname="Page" text="GO" ValidationGroup="goto" /> 
  90.                         </PagerTemplate>
  91.  
  92.                                    <EmptyDataTemplate>
  93.                                      <center> 系统提示:请输入查询条件,也可以新增用户数据。</center>
  94.                                    </EmptyDataTemplate>                  
  95.             </asp:GridView>
  96.         
  97.         </td>
  98.        </tr>
  99.        
  100.     </TABLE>
  101.     
  102.     </form>
  103. </body>
  104. </html>