Hashtable ht = new Hashtable();
Hashtable htRemove = new Hashtable();
foreach (DataGridViewColumn col in DataGridView1.Columns)
{
ht[col.DataPropertyName] = col.DataPropertyName;
}
for (int i = 0; i < dt.Columns.Count; i++)
{
if (!ht.ContainsKey(dt.Columns[i].ColumnName))
{
htRemove[dt.Columns[i].ColumnName] = dt.Columns[i].ColumnName;
}
}
foreach (Object ad in htRemove.Keys)
{
dt.Columns.Remove(ad.ToString());
}
int s = 0;
foreach (DataGridViewColumn col in DataGridView1.Columns)
{
dt.Columns[col.Name].SetOrdinal(s);
dt.Columns[col.Name].ColumnName = col.HeaderText;
s++;
}
mall springcloud
http://www.macrozheng.com/#/
https://github.com/macrozheng/mall
https://github.com/linlinjava/litemall
https://github.com/paascloud/paascloud-master
http://www.macrozheng.com/admin/index.html#/login
https://github.com/macrozheng/mall-learning
https://www.jianshu.com/p/712fab415cb5
https://www.pmdaniu.com/
https://www.tmtpost.com/4145981.html
https://www.kanzhun.com/gso5678638.html
https://zdb.pedaily.cn/inv/show8251/
产品大牛网站 http://www.pmdaniu.com