//修改进口日期 private void btnUpdateDate_ItemClick(object sender, ItemClickEventArgs e) { try { // 获取对象 List <string> vinList = Utils.GetUpdateVin(this.gvCljbxx, (DataTable)this.gcCljbxx.DataSource); if (vinList == null || vinList.Count < 1) { MessageBox.Show("请选择要修改的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } using (UpdateDateForm dateForm = new UpdateDateForm() { VinList = vinList }) { if (dateForm.ShowDialog() == DialogResult.OK) { this.searchLocal(); } } } catch (Exception) { } }
// 批量修改进口时间 private void btnUpdateDate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { // 获取对象 List <string> vinList = Utils.GetUpdateVin(this.gvGH, (DataTable)this.gcGH.DataSource); if (vinList == null || vinList.Count < 1) { MessageBox.Show("请选择要修改的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } using (UpdateDateForm dateForm = new UpdateDateForm() { Date = "GH" }) { if (dateForm.ShowDialog() == DialogResult.OK) { JaguarUtils jaguarUtil = new JaguarUtils(); if (jaguarUtil.UpdateGHImportDate(vinList, dateForm.Date)) { this.searchLocal(); } } } } catch (Exception) { } }