zoukankan      html  css  js  c++  java
  • Dictionary

                Dictionary<string, ExtendColGroup> extendcolgroup = new Dictionary<string, ExtendColGroup>();
                foreach (var item in cols)
                {
                    if (extendcolgroup.ContainsKey(item.ExtendColGroupName))
                    {
                        ExtendColGroup colItem = extendcolgroup[item.ExtendColGroupName];
                        colItem.Count++;
                        colItem.Items.Add(item);
                    }
                    else
                    {
                        var colItem = new ExtendColGroup() { Items = new List<V_Sys_Customer>(), ExtendColGroupName = item.ExtendColGroupName };
                        colItem.Count = 1;
                        colItem.Items.Add(item);
                        extendcolgroup.Add(item.ExtendColGroupName, colItem);
    
                    }
                }
                ViewData["extendcolgroup"] = extendcolgroup;
    
    
    
                cols.Add(new V_Sys_Customer() { ExtendColName = "afas", ExtendColValue = "sdfas" });
                cols.Add(new V_Sys_Customer() { ExtendColName = "sdf", ExtendColValue = "asdfadsf" });
                cols.Add(new V_Sys_Customer() { ExtendColName = "trge", ExtendColValue = "asdfdasf" });
                cols.Add(new V_Sys_Customer() { ExtendColName = "34", ExtendColValue = "asdfasdf" });
                cols.Add(new V_Sys_Customer() { ExtendColName = "asdas爱的", ExtendColValue = "asdfasdf" });
                ViewData["cols"] = cols;
  • 相关阅读:
    centos7 mysql 数据库备份与还原
    Centos 7 搭建wordpress
    Centos 7 安装 mysql5.7
    linux 搭建php网站许愿墙
    GNOME桌面的安装
    cetnos 7 ntp服务的安装与配置
    Tornado初探
    Mysql报错 Cannot load from mysql.proc
    zabbix install
    PYPY_GC
  • 原文地址:https://www.cnblogs.com/dekevin/p/4368034.html
Copyright © 2011-2022 走看看