private void btnCancle_Click(object sender, EventArgs e) { //直接根据选中的项的数量来还原 string result = null; int n = clbHistory.CheckedItems.Count; for (int i = 0; i < n; i++) { result = StaticSQLiteHelper.Recovery(); } //string result=StaticSQLiteHelper.Recovery(); if (result == null) { MessageBox.Show("已经没有可以撤销的操作!"); } else { //MessageBox.Show(result); schedule = new Schedule(StaticSQLiteHelper.GetSchedule()); nightSchedule = new Schedule(StaticSQLiteHelper.GetNightSchedule()); loadClassSchedule(currentClassID); loadHistory(); } }