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("匹配关系已取消!");
         }
     }
 }
Exemple #2
0
 /// <summary>
 /// 窗体加载
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void EnterpriseMapAuto_Load(object sender, EventArgs e)
 {
     InitFromCacheByData(HosptailIDCompareBLL.GetInstance("ClientDB").GetEmedCorpListDs().Tables[0]);
     this.EmedbindingSource.DataSource = base.gridDataView;
     this.pageNavigator1.ItemCount     = base.cachedDataView.Count;
     this.ERPbindingSource.DataSource  = dtNotMap.DefaultView;
     this.cmbMapStutas.Text            = "全部";
 }
Exemple #3
0
 public HosptailIDCompareQuery()
 {
     InitializeComponent();
     querytable = HosptailIDCompareBLL.GetInstance(Constant.ACESSDB_ALIAS).GetEPCompareQueryTable();
     base.InitFromCacheByData(querytable);
     this.pageNavigatorEPIDComItem.ItemCount = base.cachedDataView.Count;
     this.ItembindingSource.DataSource       = base.gridDataView;
     this.cbbCompare.Text = "全部数据";
 }
Exemple #4
0
        /// <summary>
        /// 绑定医院编码对照的HIS对应列表
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvEPItem_CurrentCellChanged(object sender, EventArgs e)
        {
            orgID    = this.dgvEPItem.CurrentCell == null ? "" : this.dgvEPItem.CurrentRow.Cells["buyer_orgid"].Value.ToString();
            histable = HosptailIDCompareBLL.GetInstance().GetHTComparionTable();
            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() + "条记录";
        }
Exemple #5
0
 /// <summary>
 /// 删除匹配
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDel_Click(object sender, EventArgs e)
 {
     if (dgvERPCroplist.CurrentRow != null && hashSave.ContainsKey(dgvERPCroplist.CurrentRow.Cells["buyer_code"].Value))
     {
         if (MessageBox.Show("确实要删除吗", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
         {
             HosptailIDCompareBLL.GetInstance().DeleteHisErpCorpMap(hashSave[dgvERPCroplist.CurrentRow.Cells["buyer_code"].Value].ToString());
             string sCode = dgvERPCroplist.CurrentRow.Cells["buyer_code"].Value.ToString();
             dtNotMap.DefaultView.RowFilter = " buyer_code <> '" + sCode + "'";
             dtNotMap.Select("buyer_code = '" + sCode + "'")[0]["IsMap"] = "未匹配";
             bSave = false;
             this.cmbMapStutas.Text = "未匹配";
         }
     }
 }
Exemple #6
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (!bSave)
            {
                ArrayList arrayExec = new ArrayList();
                foreach (Gpo_Hosptail_MapModel model in hashMap.Values)
                {
                    string sRecord_ID = string.Empty;
                    if (HosptailIDCompareBLL.GetInstance().JudgeHIScode(model.CorpCode, model.MapOrgId, ref sRecord_ID))
                    {
                        try
                        {
                            HosptailIDCompareBLL.GetInstance().UpdateCorpMap(sRecord_ID, model.CorpId);
                        }
                        catch (Exception me)
                        {
                            MessageBox.Show(me.Message);
                        }
                    }
                    else
                    {
                        arrayExec.Add(HosptailIDCompareBLL.GetInstance().InsertHisErpCorpMapSQL(model, out sRecord_ID));
                    }
                    if (!hashSave.ContainsKey(model.CorpCode))
                    {
                        hashSave.Add(model.CorpCode, sRecord_ID);
                    }
                }
                try
                {
                    string[] sExecs = new string[arrayExec.Count];
                    arrayExec.CopyTo(sExecs);
                    if (HosptailIDCompareBLL.GetInstance().AddHisCorpMapBatch(sExecs))
                    {
                        MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        hashMap.Clear();
                        HideSaveData();
                        bSave = true;
                    }
                }
                catch
                {
                    MessageBox.Show("保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }

                this.labNoMap.Text = dgvERPCroplist.Rows.Count.ToString() + "条记录";
            }
        }
        private void bindingDsEnterPriseMapList()
        {
            HosptailIDCompareDT = HosptailIDCompareBLL.GetInstance().GetHTComparionTable();
            base.InitFromCacheByData(HosptailIDCompareDT);
            this.pageNavigator1.ItemCount = base.cachedDataView.Count;
            try
            {
                this.EPIDComparebindingSource.DataSource = null;
                this.EPIDComparebindingSource.DataSource = base.gridDataView;
            }
            catch (Exception)
            {
                throw;
            }

            ItemFilter();
        }
Exemple #8
0
 /// <summary>
 /// 取消匹配
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnCancelMap_Click(object sender, EventArgs e)
 {
     if (dgvERPCroplist.CurrentRow != null && dgvEmedCorpList.CurrentRow != null && dgvERPCroplist.CurrentRow.Cells["IsMap"].Value.ToString() == "已匹配")
     {
         if (hashMap.Contains(dgvERPCroplist.CurrentRow.Cells["buyer_code"].Value))
         {
             hashMap.Remove(dgvERPCroplist.CurrentRow.Cells["buyer_code"].Value);
         }
         //如果已保存过
         if (hashSave.ContainsKey(dgvERPCroplist.CurrentRow.Cells["buyer_code"].Value))
         {
             HosptailIDCompareBLL.GetInstance().cancelmatch(hashSave[dgvERPCroplist.CurrentRow.Cells["buyer_code"].Value].ToString());
             hashSave.Remove(dgvERPCroplist.CurrentRow.Cells["buyer_code"].Value);
             dgvERPCroplist_RowEnter(sender, new DataGridViewCellEventArgs(0, 0));
         }
         dtNotMap.Select("buyer_code ='" + dgvERPCroplist.CurrentRow.Cells["buyer_code"].Value + "'")[0]["IsMap"] = "未匹配";
         bSave = false;
     }
 }
 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);
             }
         }
     }
 }
 ///// <summary>
 ///// 获取交易中心企业列表
 ///// </summary>
 private void GetEmedCorpList()
 {
     this.dsEmedCorpList0 = HosptailIDCompareBLL.GetInstance("ClientDB").GetEmedCorpListDs();
 }