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企业应用研发
查看全文
相关阅读:
TCP通过哪些措施,保证传输可靠
http协议---简述
单播、广播、组播、多播
axios 设置超时时间 timeout
axios 处理并发请求
vue 模板语法
vue keep-alive
v-if 条件渲染分组
debounce 防抖动函数
vue scoped 深度作用选择器
原文地址:https://www.cnblogs.com/syveen/p/189271.html
最新文章
使用ConfigurationManager类读写配置文件
C#中事件的继承
关于子类对象的构造函数和父类构造函数的执行顺序
[Ant] Ant之MacroDef—“宏
[Android Pro] Android 打包流程
[产品相关] A/B测试终极指南(翻译)
[产品相关] 时间管理
[产品相关] 浅谈灰度发布
[Android Pro] android 混淆文件project.properties和proguard-project.txt
[Android Pro] Android 之使用LocalBroadcastManager解决BroadcastReceiver安全问题
热门文章
[Android Memory] Android Zipalign zip对齐优化app程序
[Android Pro] ant 编译android工程
android混淆打包
C/C++中,空数组、空类、类中空数组的解析及其作用
几种机器学习算法的优缺点
C++ 虚拟继承
贪心算法
华为优招面试
TCP的流量控制和拥塞控制
TIME_WAIT状态及存在原因
Copyright © 2011-2022 走看看