private void btnOK_Click(object sender, EventArgs e) { try { this.periodPriceList = bsList.DataSource as List <PeriodPrices>; dataManager.SetPeriodPrice(this.periodPriceList); this.Hide(); this.DialogResult = DialogResult.OK; } catch (Exception error) { MessageBox.Show(error.Message, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } }