各位哥哥姐姐前辈,帮我看看这么写可以么?
//地点模糊查找议程信息受累看看模糊查询在这里可以这么写么?
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;
}