C#Winform内存加载多条件查询数据
来源:互联网 发布:上海软件开发 编辑:程序博客网 时间:2024/06/07 02:02
string gl_roomid = ""; int gl_row_index = -1; DataTable gl_dt = new DataTable(); DataTable dt = new DataTable();
protected void LoadData() { gl_dt = dt.Copy(); gl_dt.Columns["price"].DataType = Type.GetType("System.Decimal"); string roomid = this.txtRoomid.Text.ToString(); string price_start = this.txtPrice_Start.Text.ToString(); string price_end = this.txtPrice_End.Text.ToString(); if (roomid.Length > 0) { DataRow[] rows = gl_dt.Select(" roomid='" + roomid + "'"); if (rows.Count() > 0) { gl_dt = rows.CopyToDataTable(); } else { gl_dt.Clear(); } } if (price_start.Length > 0) { DataRow[] rows = gl_dt.Select(" price >=" + price_start + " "); if (rows.Count() > 0) { gl_dt = rows.CopyToDataTable(); } else { gl_dt.Clear(); } } if (price_end.Length > 0) { DataRow[] rows = gl_dt.Select(" price <=" + price_end + " "); if (rows.Count() > 0) { gl_dt = rows.CopyToDataTable(); } else { gl_dt.Clear(); } } this.dataGridView1.DataSource = gl_dt; }
0 0
- C#Winform内存加载多条件查询数据
- thinkphp5关联预加载数据的条件查询显示
- Winform 多线程查询数据
- 6.数据查询(条件
- C#winform导入数据
- WINFORM 多条件动态查询 通用代码的设计与实现
- linqtosql 多条件查询,拼条件查询
- HBase条件查询(多条件查询)
- HBase条件查询(多条件查询)
- HBase条件查询(多条件查询)
- HBase条件查询(多条件查询)
- HBase条件查询(多条件查询)
- HBase条件查询(多条件查询)
- HBase条件查询(多条件查询)
- SQL SERVER 动态SQL实现 多条件查询数据
- Struts2 多条件组合查询和准备默认数据
- Struts2 多条件组合查询和准备默认数据
- Struts2 多条件组合查询和准备默认数据
- css 一行内显示 超出自动隐藏
- JQ控制表格隔行换色和悬停换色
- python 使用 passlib 库在 windows 平台实现 crypt
- VB感受
- D-KSVD(Discrimination K-SVD)
- C#Winform内存加载多条件查询数据
- 纯虚函数与抽象类
- perl 解json数组
- 最近研究了一下C++里面的const
- UVA 12657 Boxes in a Line(双向链表)
- 数组指针与指针数组
- 十进制数转换为八进制数/十六进制数
- uoj184 bzoj 4456: [Zjoi2016]旅行者 分治+最短路
- wordPress搭建自己的个人网站