/// <summary>
 /// 刷新方法
 /// </summary>
 public void FlushExecute(bool IsNull)
 {
     this.LinkModel = new ObservableCollection <UnKnowLinkModel>();
     LinkModeltemp  = new ObservableCollection <UnKnowLinkModel>();
     if (IsNull)
     {
         this.LinkModel2 = new ObservableCollection <UnKnowLinkModel>();
     }
     this.Models = new ObservableCollection <DepositFund>();
     //总行可以查看所有
     if (VMHelp.PointCode == Tools.HelpClass.Current.MainWebSite)
     {
         this.Models = client.Selects();
         foreach (DepositFund item in this.Models)
         {
             UnKnowLinkModel um = new UnKnowLinkModel();
             um.DF = item;
             if (UnknowModel.UB_LinkStr != null && UnknowModel.UB_LinkStr.Contains(item.ID))
             {
                 um.IsCheck = false;
                 LinkModel2.Add(um);
             }
             else
             {
                 um.IsCheck = false;
                 LinkModel.Add(um);
                 LinkModeltemp.Add(um);
             }
         }
         return;
     }
     foreach (DepositFund item in client.Selects())
     {
         if (item.BankSiteID == VMHelp.PointCode)
         {
             this.Models.Add(item);
             UnKnowLinkModel um = new UnKnowLinkModel();
             um.DF = item;
             if (UnknowModel.UB_LinkStr != null && UnknowModel.UB_LinkStr.Contains(item.ID))
             {
                 um.IsCheck = false;
                 LinkModel2.Add(um);
             }
             else
             {
                 um.IsCheck = false;
                 LinkModel.Add(um);
                 LinkModeltemp.Add(um);
             }
         }
     }
 }
        /// <summary>
        /// 添加关联
        /// </summary>
        private void AddLinkExecute()
        {
            ObservableCollection <UnKnowLinkModel> temp = new ObservableCollection <UnKnowLinkModel>();
            UnKnowLinkModel umtemp = null;//= new UnKnowLinkModel();

            foreach (UnKnowLinkModel item in LinkModel)
            {
                if (item.IsCheck)
                {
                    if (umtemp == null)
                    {
                        umtemp = new UnKnowLinkModel();
                        umtemp = item;
                    }
                    else if (umtemp.DF.DepositType != item.DF.DepositType)
                    {
                        VMHelp.ShowMessage("所关联资金性质不一致", false);
                        return;
                    }
                }
            }
            foreach (UnKnowLinkModel item in LinkModel)
            {
                if (item.IsCheck)
                {
                    if (LinkModel2.Count > 0)
                    {
                        if (LinkModel2[0].DF.DepositType != umtemp.DF.DepositType)
                        {
                            VMHelp.ShowMessage("所关联资金性质不一致", false);
                            return;
                        }
                    }
                    LinkModeltemp.Remove(item);
                    item.IsCheck = false;
                    LinkModel2.Add(item);
                }
                else
                {
                    temp.Add(item);
                }
            }
            LinkModel = temp;
        }