zoukankan
html css js c++ java
由错误的方法中得到的
- -!今天做了件糊涂事,居然忘记用sp来直接cross表格来取值。不过由此也得到一个方法:
private
struct
SLocation
{
public
string
name;
public
int
ID;
}
private
ArrayList GetLocationArrayList()
{
if
(
this
._dsLocation.Tables.Count
<=
0
)
{
this
._dsLocation
=
this
._loc.GetLocationList();
}
DataTable _dt
=
this
._dsLocation.Tables[
0
];
ArrayList _al
=
new
ArrayList();
SLocation _stcloc
=
new
SLocation();
foreach
(DataRow _dr
in
_dt.Rows)
{
_stcloc.ID
=
Convert.ToInt32(_dr[
"
LOCATION_ID
"
]);
_stcloc.name
=
_dr[
"
LOCATION_NAME
"
].ToString();
_al.Add(_stcloc);
}
return
_al;
}
private
String GetLocationNameByID(
int
ID)
{
if
(
this
._alLocation.Count
<=
0
)
{
this
._alLocation
=
this
.GetLocationArrayList();
}
IEnumerator _emun
=
_alLocation.GetEnumerator();
SLocation _stcloc
=
new
SLocation();
String _locName
=
string
.Empty;
for
(
int
i
=
0
;i
<
_alLocation.Count
-
1
;i
++
)
{
_emun.MoveNext();
_stcloc
=
(SLocation)_emun.Current;
if
(_stcloc.ID
==
ID)
{
_locName
=
_stcloc.name;
break
;
}
}
return
_locName;
}
先声明一个结构,再将结构做为object放入arraylist.
over
愿一路奔跑不退缩,到目前一直从事.Net的B/S,C/S企业应用研发
查看全文
相关阅读:
Python 简单总结
Python 简单总结
Python 简介
Python基础题
Python基础题
tDQSS
parameter–precharge, tRCD and tRAS
parameter–key parameters
parameter -- tWR
命令集
原文地址:https://www.cnblogs.com/syveen/p/189271.html
最新文章
sqlserver2008Mail
javascript在线测试
来做轻量级的数级同步
c#开源
从xml文件中读取注释
【蛙蛙推荐】Lucene.net试用
盘古分词--功能简介
详细讲解Quartz.NET
使用Visio进行UML建模
远程桌面连接用法
热门文章
Software-Defined Networking A Comprehensive Survey --阅读_day2
SDN架构
关于SDN
Software-Defined Networking A Comprehensive Survey --阅读_day1
Software-Defined Networking之搬砖的故事
python学习之老男孩python全栈第九期_day007知识点总结
python学习之老男孩python全栈第九期_day005作业
python学习之老男孩python全栈第九期_day005知识点总结
python学习之老男孩python全栈第九期_day004知识点总结
Python 简单总结
Copyright © 2011-2022 走看看