private void btn_cancelmatch_Click(object sender, EventArgs e)
 {
     if (this.dgvEPIDCompare.CurrentRow != null)
     {
         if (MessageBox.Show("确认取消匹配关系?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
         {
             LogedInUser           curUser    = ClientSession.GetInstance().CurrentUser;
             Gpo_Hosptail_MapModel enterprise = new Gpo_Hosptail_MapModel();
             enterprise.MapOrgId     = base.CurrentUserRegOrgId;
             enterprise.CorpId       = "";
             enterprise.CorpName     = this.dgvEPIDCompare.CurrentCell == null ? "" : this.dgvEPIDCompare.CurrentRow.Cells["FULL_NAME"].Value.ToString();
             enterprise.CorpAbbr     = this.dgvEPIDCompare.CurrentCell == null ? "" : this.dgvEPIDCompare.CurrentRow.Cells["EASY_NAME"].Value.ToString();
             enterprise.ModifyUserId = base.CurrentUserId;
             enterprise.Process      = "1";
             enterprise.IsMap        = "0";
             enterprise.CorpCode     = this.dgvEPIDCompare.CurrentCell == null ? "" : this.dgvEPIDCompare.CurrentRow.Cells["CODE"].Value.ToString();
             HosptailIDCompareBLL.GetInstance("ClientDB").cancelmatch(enterprise);
             this.bindingDsEnterPriseMapList();
             ItemFilter();
             foreach (DataGridViewRow row in this.dgvEPIDCompare.Rows)
             {
                 if (row.Cells["CODE"].Value.ToString() == enterprise.CorpCode)
                 {
                     this.dgvEPIDCompare.CurrentCell = this.dgvEPIDCompare["CODE", row.Index];
                 }
             }
             EmedMessageBox.ShowInformation("匹配关系已取消!");
         }
     }
 }
        /// <summary>
        /// 保存产品对照信息
        /// </summary>
        private void SaveProductHis()
        {
            try
            {
                ArrayList list1 = new ArrayList();
                for (int num1 = 0; num1 < this.dataGridView.RowCount; num1++)
                {
                    DataGridViewRow row1 = this.dataGridView.Rows[num1];
                    Emedchina.TradeAssistant.Model.User.LogedInUser usr = ClientSession.GetInstance().CurrentUser;

                    string boolstr;
                    if (row1.Cells[0].Value != null && row1.Cells[0].Value.ToString().ToLower() == "true")
                    {
                        boolstr = "True";
                    }
                    else
                    {
                        boolstr = "False";
                    }


                    string orgId = row1.Cells["ORG_ID"].Value.ToString();
                    if (boolstr == "True") //&& !string.IsNullOrEmpty(orgId)
                    {
                        if (bll.IsExistCode(row1.Cells["CODE"].Value.ToString(), usr.UserOrg.Reg_org_id.ToString()))
                        {
                            list1.Add(bll.UpdateHisEnterpriseMapSQL(row1, row1.Cells["CODE"].Value.ToString(), base.CurrentUserId, usr.UserOrg.Reg_org_id.ToString()));
                        }
                        else
                        {
                            list1.Add(bll.InsertHisEnterpriseMapSQL(row1, base.CurrentUserId, usr.UserOrg.Reg_org_id.ToString()));
                        }
                    }
                }
                if (list1.Count < 1)
                {
                    return;
                }
                string[] textArray1 = new string[list1.Count];
                list1.CopyTo(textArray1);
                if (bll.HisOperation(textArray1))
                {
                    //this.IsSave = true;
                    EmedMessageBox.ShowInformation("保存成功!");
                }
                else
                {
                    EmedMessageBox.ShowInformation("保存失败!");
                }
            }
            catch (Exception exception1)
            {
                EmedErrorLog.SaveLog("保存失败", exception1);
            }
        }
 /// <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());
         }
     }
 }