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

.net编程

开发平台:

C#

  1. <%@ page language="C#" autoeventwireup="true" inherits="Workflow_SelectMateril, App_Web_-rs7x2pk" 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.     <base target="_self" />
  7.     <title>物资代码选择</title>
  8.     <script type="text/javascript">
  9.         function OKCancel()
  10. {
  11.     if (confirm("系统提示:您确定放弃本次物资代码的选择吗?")) 
  12.     {
  13.         window.close();
  14.     }
  15.     return false;
  16. }
  17. function SelectedCheck()
  18. {
  19.     var s = form1.WZValue.value;
  20.     s=s.replace(/^s+|s+$/g,"");
  21.     if (s=="")
  22.     {
  23.         alert("系统提示:您还没有正确的选择物资代码!");
  24.         return false;
  25.     }
  26.     if (confirm("系统提示:您确定选择『" +s + "』物资代码吗?"))
  27.             {
  28.                 return true;
  29.             }
  30.             return false;
  31. }
  32.     </script>
  33. </head>
  34. <body>
  35.     <form id="form1" runat="server">
  36.     <div>
  37.     
  38.     <table width="100%" border="0" cellpadding="0" cellspacing="0" >
  39.          <tr>
  40.          <td colspan="7">
  41.          <div style="text-indent:2em;height:300px;overflow-x:hidden;overflow-y:auto;width:100%; text-align:left;">
  42.            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="wz_id" BackColor="#CDCDCF" BorderWidth="0px"
  43.                CssClass="Grid"  SelectedRowStyle-CssClass="SelectedRow" RowStyle-CssClass="HeadingCellText" 
  44.        FooterStyle-CssClass="GridFooter"  ShowFooter="true" CellSpacing="1" CellPadding="0"
  45.                Width="98%" AllowPaging="false" AllowSorting="false"
  46.                OnRowDataBound="GridView1_RowDataBound" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" >
  47.               <AlternatingRowStyle BackColor="#F0F0F0" />
  48. <RowStyle BackColor="#F9FAFC" CssClass="HeadingCellText" />
  49. <HeaderStyle Height="25px" BackColor="#DFDFDF" CssClass="GridHeader" />
  50.                 <Columns>
  51.                         <asp:BoundField DataField="wz_name"  HeaderText="物资名称">
  52.                            <HeaderStyle Width="20%"/>
  53.                         </asp:BoundField>
  54.                         <asp:BoundField DataField="wz_spec"  HeaderText="规格型号">
  55.                             <HeaderStyle Width="40%"/>
  56.                         </asp:BoundField>
  57.                         <asp:BoundField DataField="wz_id"  HeaderText="物资代码">
  58.                             <HeaderStyle Width="15%"/>
  59.                         </asp:BoundField>
  60.                      <asp:TemplateField  HeaderText="选择物资" HeaderStyle-CssClass="TemplateFieldHeader">
  61.                             <ItemTemplate>
  62.                                 &nbsp;&nbsp;&nbsp;&nbsp;<asp:ImageButton ID="IB_Select" ToolTip="选择" runat="server" CommandName="Select" ImageUrl="Image/i_rate.gif"/> &nbsp; &nbsp;
  63.                                 <asp:ImageButton ToolTip="已选" ID="IB_Selected" runat="server" ImageUrl="Image/p5.gif" OnClientClick="javascript:return false;" Height="20" Width="20" Visible="false"/>
  64.                             </ItemTemplate>
  65.                             <ItemStyle HorizontalAlign="Left"  BorderWidth="0px"/>
  66.                              
  67.                         </asp:TemplateField>
  68.                     
  69.                    </Columns>
  70.                  <FooterStyle CssClass="GridFooter" />
  71.        <PagerStyle CssClass="GridPage" />
  72.                
  73.                <EmptyDataTemplate>
  74.                 <table width="100%" class="GridHeader">
  75.                  <tr style=" border-width:1px; height:25px;" align="center" bgcolor="#DFDFDF">
  76.                    <td  style="border:1px solid #CCCCCC; width:20%">物资名称</td>
  77.                    <td  style="border:1px solid #CCCCCC; width:40%">规格型号</td>
  78.                    <td  style="border:1px solid #CCCCCC; width:15%">物资代码</td>
  79.                    <td  style="border:1px solid #CCCCCC; text-align:center;"> 选择物资</td>
  80.                  </tr> 
  81.                </table>
  82.                 <center class="EmpetyData"> 系统提示:没有您所需要的物资代码。</center>
  83.             </EmptyDataTemplate>
  84.             </asp:GridView>
  85.          </div>
  86.          </td>
  87.        
  88.        </tr>
  89.        </table>
  90.        <table width="100%">
  91.        <tr style="height:5px;"></tr>
  92.         <tr>
  93.             <td style="width:50%"></td>
  94.             <td>
  95.             &nbsp;&nbsp;
  96.             <asp:ImageButton ID="OKConfirm" ImageUrl="~/Workflow/image/queding.gif" runat="server" OnClientClick="javascript:return SelectedCheck();" OnClick="OKConfirm_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
  97.             <asp:ImageButton ID="OKCancel" ImageUrl="~/Workflow/image/quxiao.gif" runat="server" OnClientClick="javascript:return OKCancel();" />
  98.             </td>
  99.         </tr>
  100.        </table>
  101.     </div>
  102.     <input type="hidden" id ="WZID" name ="WZID" runat="server" />
  103.     <input type="hidden" id="WZValue" name="WZValue" runat="server" />
  104.     </form>
  105. </body>
  106. </html>