private void toolHide_Click(object sender, EventArgs e) { try { RefreshGridTreeInvoke invoke; bool isHide = this.toolHide.Text == "隐藏"; string bm = base.aisinoDataGrid1.SelectedRows[0].Cells["BM"].Value.ToString(); string sjbm = base.aisinoDataGrid1.SelectedRows[0].Cells["SJBM"].Value.ToString(); string str3 = base.aisinoDataGrid1.SelectedRows[0].Cells["HZXStr"].Value.ToString(); if (str3 == "是") { if (!isHide) { this.spflManager.UpdateSPFLIsHide(bm, isHide); this.spflManager.UpdateHZXIsHideDownToUp(sjbm, isHide); if (DialogResult.Cancel == MessageBoxHelper.Show("您的上级编码的是否隐藏设置为否,下级编码的是否隐藏也会设置为否,确认该设置吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question)) { goto Label_014C; } this.spflManager.UpdateHZXIsHideUpToDown(bm, isHide); } else { this.spflManager.UpdateSPFLIsHide(bm, isHide); this.spflManager.UpdateHZXIsHideUpToDown(bm, isHide); } } if (!isHide && (str3 == "否")) { this.spflManager.UpdateHZXIsHideDownToUp(sjbm, isHide); this.spflManager.UpdateSPFLIsHide(bm, isHide); } if (isHide && (str3 == "否")) { this.spflManager.UpdateSPFLIsHide(bm, isHide); } Label_014C: invoke = new RefreshGridTreeInvoke(this.RefreshGrid); base.BeginInvoke(invoke); } catch (Exception exception) { base.log.Error("错误使用分类编码表隐藏按钮" + exception.ToString()); } }
private void DataGridCellEndEdit(object sender, DataGridRowEventArgs e) { RefreshGridTreeInvoke invoke; if (base.aisinoDataGrid1.CurrentCell.OwningColumn.Name == "ISHIDEBOOL") { string sjbm = e.CurrentRow.Cells["BM"].Value.ToString(); string str2 = e.CurrentRow.Cells["XTHASH"].Value.ToString(); string bm = e.CurrentRow.Cells["SJBM"].Value.ToString(); bool isHide = base.aisinoDataGrid1.CurrentCell.Value.ToString() == "是"; if ((str2.Length == 0) && (bm.Length == 0)) { MessageBoxHelper.Show("不允许修改普通商品上级编码的隐藏标志", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { if (((str2.Length > 1) && (bm.Length != 0)) && !isHide) { this.spManager.UpdateSPIsHide(bm, isHide); } if (str2.Length == 1) { string hide = isHide ? "1000000000" : "0000000000"; if (DialogResult.Cancel == MessageBoxHelper.Show("您的稀土上级编码的隐藏标志发生变化,下级编码的隐藏标志也会随着变化,确认该变化吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question)) { goto Label_013A; } this.spManager.UpdateXTIsHide(sjbm, hide); } this.spManager.UpdateSPIsHide(sjbm, isHide); } } Label_013A: invoke = new RefreshGridTreeInvoke(this.RefreshGrid); base.BeginInvoke(invoke); }