说不明白 看看吧
无法将类型“MyAriticket.Model.CityInfo”隐式转换为“System.Collections.Generic.IList<MyAriticket.Model.CityInfo>”。存在一个显式转换(是否缺少强制转换?)
数据访问层
//根据ID查询地区信息
public static CityInfo GetByCityId(int id)
{
string sql = " select * from CityInfo where CityId = '" + id + "'";
SqlDataReader reader = DBHelper.GetReader(sql);
if (reader.Read())
{
CityInfo item = new CityInfo();
item.CityId = Convert.ToInt32(reader["CityId"]);
item.CityName = Convert.ToString(reader["CityName"]);
item.ProvinceId = Convert.ToString(reader["ProvinceId"]);
reader.Close();
return item;
}
else
{
reader.Close();
return null;
}
}
业务逻辑层
//根据ID查询地区信息
public static CityInfo GetByCityId(int id)
{
return CityInfoService.GetByCityId(id);
}
表示层
//查询
protected void BtnGet_Click(object sender, EventArgs e)
{
////出发地
int id = Convert.ToInt32(this.ddlFromCity.SelectedValue);
IList<CityInfo> item = CityInfoManager.GetByCityId(id);
}
那位帮我看看
数据访问层
//根据ID查询地区信息
public static CityInfo GetByCityId(int id)
{
string sql = " select * from CityInfo where CityId = '" + id + "'";
SqlDataReader reader = DBHelper.GetReader(sql);
if (reader.Read())
{
CityInfo item = new CityInfo();
item.CityId = Convert.ToInt32(reader["CityId"]);
item.CityName = Convert.ToString(reader["CityName"]);
item.ProvinceId = Convert.ToString(reader["ProvinceId"]);
reader.Close();
return item;
}
else
{
reader.Close();
return null;
}
}
业务逻辑层
//根据ID查询地区信息
public static CityInfo GetByCityId(int id)
{
return CityInfoService.GetByCityId(id);
}
表示层
//查询
protected void BtnGet_Click(object sender, EventArgs e)
{
////出发地
int id = Convert.ToInt32(this.ddlFromCity.SelectedValue);
IList<CityInfo> item = CityInfoManager.GetByCityId(id);
}
那位帮我看看
...全文
相关推荐
《人不要轻易说,不》读后感.doc
总的来说,《人不要轻易说,不》这篇读后感为我提供了一种新的生活态度,它让我明白,生活中的困难是磨砺意志的砂石,是我们成长的阶梯。只有不断挑战,我们才能成为更好的自己。
女友说 Git 玩不明白,怎么办?安排。
在某个月黑风高的晚上,一脸愁容的女朋友突然跟我说,Git 老搞不明白,有什么比较好的经验可以分享下吗,说时迟,那时快,二话不说,立马开始奋笔疾书......在平时的 Coding 过程中,我们还是需要一定的 Git 操作的能力的。但是总还是存在一些场景自己突然想不起来,某个场景,应该使用什么 Git 命令可以满足自己的诉求,这个时候又需要打开 Google / Baidu,各种搜索一番,与其把时间消磨在这一次次的重复工作中,倒不如好好研究一下我们常用的命令的玩法。
做需求分析,你要弄明白的5件事.pdf
在整个流程中,需要做的事情包括:申请报修、审批、派单、接单、维修填写耗材、评价;条件这个就很好思考了,我们说两句就明白了:派单的条件是审批通过呀,审批不通过无法派单呀;评价的条件是维修完成呀。
CRC32 tools工具
这个我不多说,明白的人自然明白,不明白的人说了也不明白。
○大胆说“不”让男孩学会拒绝与被拒绝.docx
建立自我认知,有助于他们在面对超出自身能力的请求时,更有信心说“不”。5. **情感智慧**:培养男孩的情感智慧,理解自己的感受,明白说“不”并不意味着无情,而是保持真实和尊重自我。


