+ -
当前位置:首页 → 问答吧 → 一个酒店管理系统的查询按钮

一个酒店管理系统的查询按钮

时间:2011-07-05

来源:互联网

一个酒店管理系统的查询按钮 写了下面的代码 可是出错了 请问错在哪里了

  string ST_sqldb = ConfigurationSettings.AppSettings["ConnectionString"];
  SqlConnection ST_Conn = new SqlConnection(ST_sqldb);
  SqlDataAdapter ST_myadapter = new SqlDataAdapter("ST_ShowRoomById", ST_Conn);
  ST_myadapter.SelectCommond.CommandType = CommandType.StoredProcedure;
  ST_myadapter.SelectCommand.Parameters.Add("@RoomId", SqlDbType.Int);
  ST_myadapter.SelectCommand.Parameters["@RoomId"].Value = RoomIdTextBox.Text.Trim();

  DataSet ds = new DataSet();
  ST_myadapter.Fill(ds);
  dg_RoomsList.DataSource = ds;
  dg_RoomList.DataBind();
  ST_Conn.Close();

如果没有定义基类可不可以这样写啊?

作者: YOYOZYLING   发布时间: 2011-07-05

干嘛老把.NET的发在asp区。。转到ASP.NET区去吧。。

作者: tcwsyt   发布时间: 2011-07-05

提示什么错?

作者: aspwebchh   发布时间: 2011-07-05

没有提示什么,无法解决,asp.net的问题请搞清楚点

作者: zhou01102   发布时间: 2011-07-05