List<Medicine> medicinelist = new List<Medicine>();

foreach (GridViewRow row in GridView1.Rows)
{
if (row.Cells[0].Value != null && (bool)row.Cells[0].Value == true)
{
Medicine medicine = new Medicine();
medicine.Hiscode = row.Cells[1].FormattedValue.ToString();
medicine.Hisname = row.Cells[2].FormattedValue.ToString();
medicine.Hisscalctype = row.Cells[3].FormattedValue.ToString();
medicine.Hisspec = row.Cells[4].FormattedValue.ToString();
medicine.Hisunits = row.Cells[5].FormattedValue.ToString();
medicine.IsMedTre = true;
medicinelist.Add(medicine);
}
}

最新文章

  1. win8下IE10的鼠标mouse事件响应错误BUG
  2. C# Enum Name String Description之间的相互转换
  3. [原创]python之socket-ftp
  4. 再谈Jquery Ajax方法传递到action 【转载】
  5. wait、notify、notifyAll和Condition
  6. jQuery中.parent和.parents的区别
  7. Telerik XML 数据源绑定的问题
  8. [转] ArcGIS engine中气泡标注的添加、修改
  9. PeopleReady--办公学习类App产品
  10. nuget pack 时不包含依赖包(而不是引用项目的dll,区别于IncludeReferencedProjects)
  11. 无锁同步-C++11之Atomic和CAS
  12. zoj 1108 FatMouse's Speed 基础dp
  13. 【python】字符串变量赋值时字符串可用单或双引号
  14. SSH实现登陆拦截器
  15. __x__(32)0908第五天__Photoshop的基本操作
  16. angular2监听页面大小变化
  17. 深入了解IOC
  18. 8个超实用的jQuery插件应用
  19. CentOS7使用yum命令安装Java1.8
  20. mysql cast

热门文章

  1. Vue自定义指令和路由
  2. [转载]java自带线程池和队列详细讲解
  3. phpMyAdmin搭建及管理多台数据库服务器
  4. 搭建elsticsearch集群 报错with the same id but is a different node instance解决办法
  5. EffectiveJava(20)使用子类型化优化标签类
  6. 系统封装 如何加载PE到Easyboot进行合盘
  7. Python图像处理(11):k均值
  8. iOS11
  9. debounce 防抖动函数
  10. 仿百度壁纸client(六)——完结篇之Gallery画廊实现壁纸预览已经项目细节优化