我有一个自动扩展器,我希望结果应该同时带有
[System.Web.Script.Services.ScriptMethod()]
[System.Web.Services.WebMethod]
public static List<string> Get_challan(string prefixText)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["BMS"].ToString());
con.Open();
SqlCommand cmd12 = new SqlCommand("select distinct(product_accessories),delivery_cann from hardware where delivery_cann like @Name+'%' and **suppl_type=3**", con);
cmd12.Parameters.AddWithValue("@Name", prefixText);
SqlDataAdapter da12 = new SqlDataAdapter(cmd12);
DataTable dt12 = new DataTable();
da12.Fill(dt12);
List<string> CountryNames12 = new List<string>();
for (int i = 0; i < dt12.Rows.Count; i++)
{
CountryNames12.Add(dt12.Rows[i][1].ToString());
}
return CountryNames12;
}
在上面的代码中,suppl_type=3
这不起作用请帮助我