C# 动态显示下拉列表的数据(3)

public List list = new List();
//查询采购员
 SqlConnection conn = new SqlConnection("Server=.;Database=JiYunMaterials;user id=sa;password=root;");
            SqlDataAdapter sda = new SqlDataAdapter("select * from tbl_Group", conn);
         
         //   string sq = "select UserName from UserInfo";
            DataTable ds = new DataTable();
          //  Com c = new Com();
           // ds = c.GetTable(sq);
 DataTable ds = new DataTable();
            sda.Fill(ds);
            list = Com.ConvertDataTableToList(ds);

//qiantai代码
    采购人:               
           

你可能感兴趣的:(C#)