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企业应用研发
查看全文
相关阅读:
crontab 定时任务设置
kafka如何保证消息得顺序性
Spark Streaming和Kafka整合是如何保证数据零丢失
docker学习之路(安装、使用)
linux根文件系统 /etc/resolv.conf 文件详解
Navicat Premium 12连接MySQL数据库出现Authentication plugin 'caching_sha2_password' cannot be loaded的解决方案
window10 安装Mysql 8.0.17以及忘记密码重置密码
ubantu安装mysql (解决配置密码问题)
Navicat Premium 12 connection is being used以及查询sql文件保存位置
离线安装PM2
原文地址:https://www.cnblogs.com/syveen/p/189271.html
最新文章
HTML5 indexedDB数据库的入门学习(一)
元素居中的三种方法(包括垂直居中和水平居中)
如何定位到append的当前位置,不用拉滚动条scrollIntoView方法
appendChild()插入节点需注意的问题
ie6/7/8中span右浮动折行问题的解决方案
取整函数和取整运算符的细节比较
浮动和绝对定位的区别
从医生看病和快餐店点餐理解Node.js的事件驱动
解析$.grep()源码及透过$.grep()看(两次取反)!!的作用
解决element 照片墙根据图片地址回显的问题
热门文章
element-UI 渲染动态的 prop 和 label 以及导出动态的数据为excel
element-ui table 一次性导出上万条数据为excel
js将时间戳转换为年月日时分秒
js验证网址的合法性
js使用正则表达式匹配富文本框中的img标签
element-ui禁止用户输入空格
element-ui 密码输入框禁止输入特殊字符
element-ui input只允许输入数字
如何将整个网站设置为灰色
linux下用户管理命令、用户组管理命令
Copyright © 2011-2022 走看看