private void btnDelete_Click(object sender, EventArgs e) { List<int> records = GetCheckedRecord(); if (records == null || records.Count < 1) { MessageBox.Show("请勾选需要删除的档案记录", "提示信息"); return; } if (MessageBox.Show("您确定要删除勾选的档案记录吗?", "询问", MessageBoxButtons.OKCancel) == System.Windows.Forms.DialogResult.Cancel) return; if (backgroundWorker3.IsBusy) return; panelLoading.Visible = true; panelLoading.BringToFront(); panelLoading.Location = new Point((this.Width / 2 - this.panelLoading.Width / 2), this.Height / 2 - this.panelLoading.Height - 20); lblLoadingText.Text = "正在请求删除档案操作,请稍等..."; BoxLabelConfig para = new BoxLabelConfig(); para.ArchiveIds = records; backgroundWorker3.RunWorkerAsync(para); }
private void btnConfig_Click(object sender, EventArgs e) { List<int> records = GetCheckedRecord(); if (records == null || records.Count < 1) { MessageBox.Show("请勾选需要归盒的档案记录", "提示信息"); return; } FormBoxList form = new FormBoxList("档案归盒"); form.Text = "请选择档案盒标签,进行归盒操作"; form.MinimizeBox = false; form.MaximizeBox = false; form.WindowState = FormWindowState.Normal; form.StartPosition = FormStartPosition.CenterParent; DialogResult result = form.ShowDialog(); if (result != System.Windows.Forms.DialogResult.OK) return; BoxBean boxLabel = form.SelectedBoxLabel; if (boxLabel == null) return; if (backgroundWorker2.IsBusy) return; panelLoading.Visible = true; panelLoading.BringToFront(); panelLoading.Location = new Point((this.Width / 2 - this.panelLoading.Width / 2), this.Height / 2 - this.panelLoading.Height - 20); lblLoadingText.Text = "正在请求档案归盒操作,请稍等......"; BoxLabelConfig para = new BoxLabelConfig(); para.ArchiveIds = records; para.BoxId = boxLabel.id; backgroundWorker2.RunWorkerAsync( para ); }