110,569
社区成员
发帖
与我相关
我的任务
分享
MySqlCommand command = new MySqlCommand("select distinct 提交时间 from 价签单", mysql.mycon);
MySqlDataReader reader = command.ExecuteReader();
while (reader.Read())
{
for (int i = 0; i < listBox1.Items.Count; i++)
{
if (reader.GetString(0).Equals((string)listBox1.Items[i]))
{
break;
}
else
{
if (i == listBox1.Items.Count - 1)
listBox1.Items.Add(reader.GetString(0));
else
continue;
}
}