zoukankan      html  css  js  c++  java
  • UltraWebGrid 新增加行

                //取出UltraWebGrid1的key()
                ArrayList alItemId = new ArrayList();
                RowsCollection row1 
    = UltraWebGrid1.DisplayLayout.Rows;
                
    for (int i = 0; i < row1.Count; i++)
                {
                    
    //PTK_PLAN_ITEM 捆 包 号
                    if (row1[i].Cells.FromKey("cust_bundle_no").Value != null)
                        alItemId.Add(row1[i].Cells.FromKey(
    "cust_bundle_no").Value.ToString());
                }
                
    //DialogUltraWebGrid
                SelectedRowsCollection rows = DialogUltraWebGrid.DisplayLayout.SelectedRows;
                
    for (int i = 0; i < rows.Count; i++)
                {
                    
    //添加不存在的记录
                    if (!alItemId.Contains(rows[i].Cells.FromKey("KBH").Value.ToString()))
                    {
                        UltraGridRow GridRow 
    = new UltraGridRow();
                        
    //------------------------------------------------                   
                        GridRow = this.UltraWebGrid1.Rows.Band.AddNew();
                        GridRow.Cells.FromKey(
    "cust_bundle_no").Value = rows[i].Cells.FromKey("kbh").Value.ToString();  //客户捆包号
                        GridRow.Cells.FromKey("bundle_no").Value = rows[i].Cells.FromKey("mjh").Value.ToString();  //母卷号
                        GridRow.Cells.FromKey("steel_num").Value = rows[i].Cells.FromKey("bs_gzmc").Value.ToString();  //母材钢种
                        GridRow.Cells.FromKey("net_qty").Value = rows[i].Cells.FromKey("jz").Value.ToString();  //母材净重
                        GridRow.Cells.FromKey("prod_pieces").Value = rows[i].Cells.FromKey("zs").Value.ToString();  //成品数量
                    }
                }
  • 相关阅读:
    面试话痨(四)常量在哪里呀,常量在哪里
    面试话痨(三)我会锁的四种配法,您配吗?
    面试话痨(二)C:JAVA String,别以为你穿个马甲我就不认识你了
    面试话痨(一)让我们来热切的讨论这个养猪场吧
    (JAVA)String类型的逻辑语句编译
    小白的REDIS学习(二)-链表
    小白的Redis学习(一)-SDS简单动态字符串
    mongo中的游标与数据一致性的取舍
    spring-data-mongodb与mongo shell的对应关系
    spring-data-mongodb 使用原生aggregate语句
  • 原文地址:https://www.cnblogs.com/myx/p/1378464.html
Copyright © 2011-2022 走看看