标题:各位哥哥姐姐前辈,帮我看看这么写可以么?
取消只看楼主
william_more
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2011-6-20
 问题点数:0 回复次数:0 
各位哥哥姐姐前辈,帮我看看这么写可以么?
        //地点模糊查找议程信息
受累看看模糊查询在这里可以这么写么?
        public Agendum GetAgendumByIntangibleSitus(string Situs)
        {
            Agendum agendum = new Agendum();
            sql = "select * from Agendm where Situs Like%" + Convert.ToString(Situs) + "%";
            using (SqlDataReader reader = DBHelper.GetReader(sql))
            {
                if (reader.Read())
                {
                    agendum.CreateStaffID = Convert.ToInt32(reader["CreateStaffID"]);
                    agendum.AgendumTypeID = Convert.ToInt32(reader["AgendumTypeID"]);
                    agendum.Subject = Convert.ToString(reader["Subject"]);
                    agendum.Situs = Convert.ToString(reader["Situs"]);
                    agendum.StartingTime = Convert.ToDateTime(reader["StartinTime"]);
                    agendum.EndTime = Convert.ToDateTime(reader["EndTime"]);
                    agendum.Content = Convert.ToString(reader["Content"]);
                    agendum.CreateDate = Convert.ToDateTime(reader["CreateDate"]);
                    agendum.OpenAgendum = Convert.ToBoolean(reader["OpenAgendum"]);
                }
            }
            return agendum;
        }

搜索更多相关主题的帖子: 哥哥 where 
2011-06-20 14:56



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-343450-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.196382 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved