ReportTriggerSetupCmd model = new ReportTriggerSetupCmd();
model.setRName(StringUtils
.getValeByName("cmdname", row, colLabel).asString());
model.setRId(StringUtils
.getValeByName("cmid", row, colLabel).asString());
model.setNeedConfirm(StringUtils
.getValeByName("cmneedConfirm", row, colLabel).asBoolean());
model.setOnNow(StringUtils
.getValeByName("cmonNow", row, colLabel).asBoolean());
model.setSt(StringUtils
.getValeByName("cmst", row, colLabel).asString());
model.setInterval(StringUtils
.getValeByName("cminterval", row, colLabel).asInt());
model.setTimes(StringUtils
.getValeByName("times", row, colLabel).asInt());
List.add(model);
model.setRName(StringUtils
.getValeByName("cmdname", row, colLabel).asString());
model.setRId(StringUtils
.getValeByName("cmid", row, colLabel).asString());
model.setNeedConfirm(StringUtils
.getValeByName("cmneedConfirm", row, colLabel).asBoolean());
model.setOnNow(StringUtils
.getValeByName("cmonNow", row, colLabel).asBoolean());
model.setSt(StringUtils
.getValeByName("cmst", row, colLabel).asString());
model.setInterval(StringUtils
.getValeByName("cminterval", row, colLabel).asInt());
model.setTimes(StringUtils
.getValeByName("times", row, colLabel).asInt());
List.add(model);
.getValeByName("cmst", row, colLabel).asString());
st的定义:protected TObject st; 错误提示我应该用.asTObject 可是没有这么写后还是出错请高手帮我看下 要憋死我了,另外请帮我解析下这段代码,本人初学者不胜感激我怎么写请高手帮我看看这语句!
表明你的st类型是TObject的,但是
model.setSt(StringUtils.getValeByName("cmst", row, colLabel).asString());
这句中我感觉你setSt传入的参数是String的,当然与st的类型不符合。
--> model.setSt((TObject)StringUtils.getValeByName("cmst", row, colLabel).asString());
强制转换一下试试