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企业应用研发
查看全文
相关阅读:
模板嵌套类别名作为函数返回类型,可能会提示的编译错误
不能将“this”指针从“const SqQueue<ElementType>”转换为“SqQueue<ElementType> &
与左侧的 圆括号“(”(位于“e:大二上课程课件、作业和答案数据结构chapter4sqstacksqstackmysqstack.h(23)”)匹配之前遇到文件结束
operator <<”不明确
此声明没有类型说明符
设计模式一责任链模式
设计模式一静态代理模式
设计模式一原型模式
设计模式一观察者模式
设计模式一备忘录模式
原文地址:https://www.cnblogs.com/syveen/p/189271.html
最新文章
[CSP-S模拟测试]:金(king)(高精度+模拟)
[CSP-S模拟测试]:简单的填数(贪心+模拟)
[CSP-S模拟测试]:简单的玄学(数学)
[CSP-S模拟测试]:游戏(最短路)
[CSP-S模拟测试]:蛋糕(区间DP)
[CSP-S模拟测试]:字符(模拟+剪枝)
BZOJ4031 [HEOI2015]小Z的房间 【矩阵树定理 + 高斯消元】
BZOJ4890 [Tjoi2017]城市 【树形dp】
BZOJ3456 城市规划 【分治NTT】
BZOJ3622 已经没有什么好害怕的了 【dp + 二项式反演】
热门文章
BZOJ4001 [TJOI2015]概率论 【生成函数】
BZOJ1025 [SCOI2009]游戏 【置换群 + 背包dp】
BZOJ1004 [HNOI2008]Cards 【burnside定理 + 01背包】
BZOJ4888 [Tjoi2017]异或和 【树状数组】
BZOJ4824 [Cqoi2017]老C的键盘 【树形dp】
POJ3252 Round Numbers 【数位dp】
istream不是std的成员
为什么感觉明明把两个链表链接起来了,但是实际上没有
单源最短路径Dijkstra算法,多源最短路径Floyd算法
如果debug调试的时候中断总是停在析构函数的delete[] p上
Copyright © 2011-2022 走看看