private void btn_cancelmatch_Click(object sender, EventArgs e)
        {
            DataRow dr = gridView3.GetDataRow(gridView3.FocusedRowHandle);

            if (dr != null)
            {
                if (XtraMessageBox.Show("确认取消匹配关系?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    LogedInUser             curUser    = ClientSession.GetInstance().CurrentUser;
                    Gpo_EnterPrice_MapModel enterprise = new Gpo_EnterPrice_MapModel();
                    enterprise.MapOrgId     = curUser.UserOrg.Id;
                    enterprise.CorpId       = "0";
                    enterprise.CorpName     = dr["FULL_NAME"].ToString();
                    enterprise.CorpAbbr     = dr["EASY_NAME"].ToString();
                    enterprise.ModifyUserId = base.CurrentUserId;
                    enterprise.Process      = "1";
                    enterprise.IsMap        = "0";
                    enterprise.CorpCode     = dr["HIS_ORG_ID"].ToString();
                    EnterpriseIDCompareBLL.GetInstance().cancelMatch(enterprise);
                    this.bindingDsEnterPriseMapList();
                    ItemFilter();
                    for (int i = 0; i < this.gridView3.RowCount; i++)
                    {
                        DataRow drow = gridView3.GetDataRow(i);
                        if (drow["HIS_ORG_ID"].ToString() == enterprise.CorpCode)
                        {
                            this.gridView3.FocusedRowHandle = i;
                        }
                    }
                    XtraMessageBox.Show("匹配关系已取消!");
                }
            }
        }
        private void btnDel_Click(object sender, EventArgs e)
        {
            DataRow dr = gridView3.GetDataRow(gridView3.FocusedRowHandle);

            if (dr != null)
            {
                if (XtraMessageBox.Show("确认删除HIS记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    try
                    {
                        string mapId = dr["ID"].ToString();
                        EnterpriseIDCompareBLL.GetInstance().DeleteHisErpCorpMap(mapId);
                    }
                    catch (Exception ex)
                    {
                        XtraMessageBox.Show("保存时发送错误:" + ex.Message.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    finally
                    {
                        isdeleted = true;
                        this.bindingDsEnterPriseMapList();
                        XtraMessageBox.Show("删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
        }
 public EnterpriseIDCompareQuery()
 {
     InitializeComponent();
     querytable = EnterpriseIDCompareBLL.GetInstance().GetEPCompareQueryTable();
     base.InitFromCacheByData(querytable);
     this.ItembindingSource.DataSource = base.cachedDataView;
     this.cbbCompare.Text = "全部数据";
 }
        private void bindingDsEnterPriseMapList()
        {
            EnterpriseIDCompareDT = EnterpriseIDCompareBLL.GetInstance().GetEPComparionTable();

            base.InitFromCacheByData(EnterpriseIDCompareDT);
            try
            {
                this.EPIDComparebindingSource.DataSource = null;
                this.EPIDComparebindingSource.DataSource = this.cachedDataView;
            }
            catch (Exception)
            {
                throw;
            }
            ItemFilter();
        }
        /// <summary>
        /// 列表中焦点行change事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void gridView5_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            DataRow dr = gridView5.GetDataRow(gridView5.FocusedRowHandle);

            if (dr != null)
            {
                orgID    = dr["send_orgid"].ToString();
                histable = EnterpriseIDCompareBLL.GetInstance().GetEPComparionTable();
                string filter = "1=1 and ORG_ID='" + orgID + "'";
                histable.DefaultView.RowFilter = filter;
                if (histable.DefaultView.Count > 0)
                {
                    this.hisbindingSource.DataSource = histable;
                }
                this.lblHiscount.Text = histable.DefaultView.Count.ToString() + "条记录";
            }
        }
 ///// <summary>
 ///// 获取交易中心企业列表
 ///// </summary>
 private void GetEmedCorpList()
 {
     this.dsEmedCorpList0 = EnterpriseIDCompareBLL.GetInstance().GetEmedCorpListDs();
 }