private void buttonClear_Click(object sender, EventArgs e) { UpdateCache(); int effectRows = new DatabaseAgency().ClearCache(); if (effectRows == -1) { MessageBox.Show("无需提交,因为没有缓存文件。"); } else if (effectRows == 0) { MessageBox.Show("无需提交,因为缓存为空。", "提示"); } else { MessageBox.Show("操作成功,已经清除缓存并提交到数据库中。", "提示"); } this.Close(); }