JAVA日报
简单的.net增删改查(展示函数设计)
public void show()
{
listBox1.Items.Clear();
MySqlDataReader item = getReader("select * from information");
string s = "学号|".PadLeft(9) + "姓名|".PadLeft(9) + "年龄|".PadLeft(9) + "家庭住址|".PadLeft(7) + "电话|".PadLeft(9);
listBox1.Items.Add(s);
while (item.Read())
{
string str = item.GetString("xh").PadLeft(10) + "|" + item.GetString("name").PadLeft(10) + "|" + item.GetString("age").PadLeft(10) + "|" + item.GetString("area").PadLeft(10) + "|" + item.GetString("phone").PadLeft(10) + "|";
listBox1.Items.Add(str);
}
}