/// <summary> /// 保存对照信息 /// </summary> private void SaveCorpMap() { if (this.getCorpInput()) { try { if (flag == "ADD") { if (bll.JudgeHIScode(this.enterprise.CorpCode, this.enterprise.MapOrgId) < 1) { bll.InsertHisErpCorpMap(this.enterprise); EmedMessageBox.ShowInformation("保存成功!"); this.ClearAll(); this.IsSave = true; this.bindingDsEmedCorpList(); searchInput.SearchSendName = tb_sendName.Text; filterDsEmedCorpList(searchInput); } else { EmedMessageBox.ShowInformation("此买方编码已存在!"); } } else if (flag == "MODIFY") { bll.UpdateHisErpCorpMap(this.enterprise); EmedMessageBox.ShowInformation("保存成功!"); this.IsSave = true; this.bindingDsEmedCorpList(); searchInput.SearchSendName = tb_sendName.Text; filterDsEmedCorpList(searchInput); } } catch (Exception ex) { EmedMessageBox.ShowError("保存时发送错误:" + ex.Message.ToString()); } } }
private void btnDel_Click(object sender, EventArgs e) { if (this.dgvEPIDCompare.CurrentRow != null) { if (MessageBox.Show("确认删除HIS记录?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) { try { string mapId = this.dgvEPIDCompare.CurrentCell == null ? "" : this.dgvEPIDCompare.CurrentRow.Cells["ID"].Value.ToString(); HosptailIDCompareBLL.GetInstance("ClientDB").DeleteHisErpCorpMap(mapId); } catch (Exception ex) { EmedMessageBox.ShowError("保存时发送错误:" + ex.Message.ToString()); } finally { isdeleted = true; this.bindingDsEnterPriseMapList(); MessageBox.Show("删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } }