zoukankan      html  css  js  c++  java
  • ASPNET WebForm T1453工作记录

    表格代码:

      1 yyc:SmartGridView ID="GvResultList" runat="server" AllowPaging="True" AutoGenerateColumns="false"
      2                                                 CellPadding="4" CssClass="GridViewStyle" GridLines="Vertical" HeaderStyle-Wrap="false"
      3                                                 RowStyle-Wrap="false" AllowSorting="True" OnSorting="GvResultList_Sorting" OnRowDataBound="GvResultList_RowDataBound" 
      4                                                 DataKeyNames="SHIPMENT_ID,SP_SHIPMENT_INVOICE_ID,SHIPMENT_INVOICE_ID,TRANSACTION_ID,PART_NUMBER,SP_TRANSACTION_TYPE_ID,SP_TRANSACTION_ID,IN_QUANTITY,OUT_QUANTITY,FB_TYPE,SP_SEQUENCE_NUMBER,SP_SHIPMENT_ID,SEQUENCE_NUMBER">
      5                                                 <FixRowColumn FixColumns="0" FixRows="-1" TableHeight="52px" TableWidth="780px" />
      6                                                 <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" Height="30px"></AlternatingRowStyle>
      7                                                 <Columns>
      8                                                     <asp:TemplateField ItemStyle-Width="1px" ItemStyle-CssClass="td_center_checkbox">
      9                                                         <HeaderTemplate>
     10                                                             <input id="chkSelectAll" type="checkbox" onclick="CheckALL(this,'chkSelect')" />
     11                                                         </HeaderTemplate>
     12                                                         <ItemTemplate>
     13                                                             <asp:CheckBox ID="chkSelect" onclick="checkRowsAndSetFBType('chkSelect');" runat="server" />
     14                                                             <asp:HiddenField ID="hidFBType" runat="server" Value='<%# DataBinder.Eval(Container, "DataItem.FB_TYPE") %>' />
     15                                                         </ItemTemplate>
     16                                                         <ItemStyle Wrap="false" />
     17                                                     </asp:TemplateField>
     18                                                     <asp:BoundField ItemStyle-Wrap="false" DataField="SHIPMENT_NAME" HeaderText="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_001 %>"
     19                                                         SortExpression="SHIPMENT_NAME" />
     20                                                     <asp:BoundField ItemStyle-Wrap="false" DataField="CUSTOMER_ASSIGNED_ID" HeaderText="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_002 %>"
     21                                                         SortExpression="CUSTOMER_ASSIGNED_ID" />
     22                                                     <asp:BoundField ItemStyle-Wrap="false" DataField="TRANSACTION_NAME" HeaderText="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_003 %>"
     23                                                         SortExpression="TRANSACTION_NAME" />
     24                                                     <asp:BoundField ItemStyle-Wrap="false" DataField="TRANSACTION_NUMBER" HeaderText="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_004 %>"
     25                                                         SortExpression="TRANSACTION_NUMBER" />
     26                                                     <asp:BoundField ItemStyle-Wrap="false" DataField="I_E_FLAG" HeaderText="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_005 %>"
     27                                                         SortExpression="I_E_FLAG" />
     28                                                     <asp:BoundField ItemStyle-Wrap="false" DataField="SP_SHIPMENT_INVOICE_ID" HeaderText="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_006 %>"
     29                                                         SortExpression="SP_SHIPMENT_INVOICE_ID" />
     30                                                     <asp:BoundField ItemStyle-Wrap="false" DataField="SHIPMENT_INVOICE_ID" HeaderText="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_007 %>"
     31                                                         SortExpression="SHIPMENT_INVOICE_ID" />
     32                                                     <asp:BoundField ItemStyle-Wrap="false" DataField="PART_NUMBER" HeaderText="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_008 %>"
     33                                                         SortExpression="PART_NUMBER" />
     34                                                         <asp:BoundField ItemStyle-Wrap="false" DataField="SP_TRANSACTION_TYPE" HeaderText="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_009 %>"
     35                                                         SortExpression="SP_TRANSACTION_TYPE" />
     36                                                     <asp:BoundField ItemStyle-Wrap="false" DataField="SP_TRANSACTION_ID" HeaderText="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_010 %>"
     37                                                         SortExpression="SP_TRANSACTION_ID" />
     38                                                         <asp:BoundField ItemStyle-Wrap="false" DataField="IN_QUANTITY" HeaderText="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_011 %>"
     39                                                         SortExpression="IN_QUANTITY" />
     40                                                         <asp:BoundField ItemStyle-Wrap="false" DataField="OUT_QUANTITY" HeaderText="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_012 %>"
     41                                                         SortExpression="OUT_QUANTITY" />
     42                                                     <asp:TemplateField HeaderText="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_013 %>">
     43                                                         <ItemTemplate>
     44                                                             <input id="ipt_outQuantity" runat="server" type="text" value='<%# DataBinder.Eval(Container, "DataItem.OUT_QUANTITY") %>' v='<%# DataBinder.Eval(Container, "DataItem.OUT_QUANTITY") %>' onblur='chkOutBoundQuantity(this);' />
     45                                                         </ItemTemplate>
     46                                                         <ItemStyle Wrap="False"></ItemStyle>
     47                                                     </asp:TemplateField>
     48                                                     
     49                                                 </Columns>
     50                                                 <EmptyDataTemplate>
     51                                                     <tr class="GridViewHeaderStyle">
     52                                                         <th>
     53                                                             <input id="chkAll" type="checkbox" />
     54                                                         </th>
     55                                                         <th>
     56                                                             <asp:Label ID="Label10" runat="server" Text="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_001 %>"></asp:Label>
     57                                                         </th>
     58                                                         <th>
     59                                                             <asp:Label ID="Label13" runat="server" Text="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_002 %>"></asp:Label>
     60                                                         </th>
     61                                                         <th>
     62                                                             <asp:Label ID="Label71" runat="server" Text="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_003 %>"></asp:Label>
     63                                                         </th>
     64                                                         <th>
     65                                                             <asp:Label ID="Label11" runat="server" Text="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_004 %>"></asp:Label>
     66                                                         </th>
     67                                                         <th>
     68                                                             <asp:Label ID="Label16" runat="server" Text="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_005 %>"></asp:Label>
     69                                                         </th>
     70                                                         <th>
     71                                                             <asp:Label ID="Label17" runat="server" Text="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_006 %>"></asp:Label>
     72                                                         </th>
     73                                                         <th>
     74                                                             <asp:Label ID="Label19" runat="server" Text="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_007 %>"></asp:Label>
     75                                                         </th>
     76                                                         <th>
     77                                                             <asp:Label ID="Label20" runat="server" Text="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_008 %>"></asp:Label>
     78                                                         </th>
     79                                                         <th>
     80                                                             <asp:Label ID="Label21" runat="server" Text="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_009 %>"></asp:Label>
     81                                                         </th>
     82                                                         <th>
     83                                                             <asp:Label ID="Label12" runat="server" Text="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_010 %>"></asp:Label>
     84                                                         </th>
     85                                                         <th>
     86                                                             <asp:Label ID="Label23" runat="server" Text="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_011 %>"></asp:Label>
     87                                                         </th>
     88                                                         <th>
     89                                                             <asp:Label ID="Label25" runat="server" Text="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_012 %>"></asp:Label>
     90                                                         </th>
     91                                                         <th>
     92                                                             <asp:Label ID="Label26" runat="server" Text="<%$ Resources:LocalizedText, T1453_CreatShippingPlanAndInvoiceFromWarehouse_Grid_013 %>"></asp:Label>
     93                                                         </th>
     94                                                     </tr>
     95                                                 </EmptyDataTemplate>
     96                                                 <PagerSettings Visible="False" />
     97                                                 <FooterStyle CssClass="GridViewFooterStyle" />
     98                                                 <RowStyle CssClass="GridViewRowStyle" Height="30px" />
     99                                                 <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
    100                                                 <PagerStyle CssClass="GridViewPagerStyle" />
    101                                                 <HeaderStyle CssClass="GridViewHeaderStyle" />
    102                                             </yyc:SmartGridView>
    View Code

    程序后台获取gridview中选中checkbox的记录:

     1 CheckBox cb;
     2             List<string> list = new List<string>();
     3             string fbType = string.Empty;
     4 
     5             try
     6             {
     7                 for (int i = 0; i < GvResultList.Rows.Count; i++)
     8                 {
     9                     cb = (CheckBox)GvResultList.Rows[i].FindControl("chkSelect");
    10                     if (cb.Checked)
    11                     {
    12                         fbType = ((HiddenField)this.GvResultList.Rows[i].FindControl("hidFBType")).Value;
    13 
    14                         if (!string.IsNullOrEmpty(fbType))
    15                         {
    16                             list.Add(fbType);
    17                         }
    18                     }
    19                 }
    20 
    21                 if (list.Count > 0 && list.Distinct().Count() == 1)
    22                 {//当勾选的记录存在分拨类型时,选中分拨类型和变更目标票据类型
    23                     ddlDistribution.SelectedValue = list[0].ToString();
    24                     if ("0".Equals(list[0]))
    25                     {
    26                         Label22.Text = "目标分拨发票号";
    27                     }
    28                     else
    29                     {
    30                         Label22.Text = "目标商业发票号";
    31                     }
    32                 }
    33                 else
    34                 {
    35                     ddlDistribution.SelectedValue = "";
    36                     Label22.Text = "目标商业发票号";
    37                 }
    38             }
    39             catch (System.Exception ex)
    40             {
    41                 log.Error(ex.Message);
    42             }
    View Code

    JS如何给devexpress的日期控件

    1. 需要给日期控件指定ClientInstanceName="ins"

    2. 在js中使用 ins.SetValue(new Date(2015,5,27)); 

                      var dtVal = ins.GetValue();

    关于delegate的理解类似于js中的匿名方法

  • 相关阅读:
    POJ 3187 Backward Digit Sums
    POJ 3669 Meteor Shower BFS
    POJ 1979 Red and Black DFS
    不想切题、
    企业管理信息系统成功实施的四个阶段
    linux下memcached的安装
    Apache开启伪静态示例
    网页设计基础知识
    memcached安装说明
    伪静态.htaccess的练习
  • 原文地址:https://www.cnblogs.com/kkwoo/p/4532696.html
Copyright © 2011-2022 走看看