示例#1
0
 private void BtRefresh_Click(object sender, RoutedEventArgs e)
 {
     if (tb_Document.IsSelected)
     {
         DSearchControl.ResetSearchControl();
         d = new DocumentModel(this);
     }
     else if (tb_DocumentAttributes.IsSelected)
     {
         DASearchControl.ResetSearchControl();
         da = new DocumentAttributesModel(this);
     }
     else if (tb_DocumentAttributesBankInfo.IsSelected)
     {
         DABISearchControl.ResetSearchControl();
         dabi = new DocumentAttributesBankInfoModel(this);
     }
     else if (tb_DocumentAttributesRef.IsSelected)
     {
         DARSearchControl.ResetSearchControl();
         dar = new DocumentAttributesRefModel(this);
     }
 }
示例#2
0
        private void TbPage_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (!(e.Source is TabControl))
            {
                return;
            }

            if (tb_Document.IsSelected)
            {
                if (d == null)
                {
                    d = new DocumentModel(this);
                }
            }
            else if (tb_DocumentAttributes.IsSelected)
            {
                if (da == null)
                {
                    da = new DocumentAttributesModel(this);
                }
            }
            else if (tb_DocumentAttributesBankInfo.IsSelected)
            {
                if (dabi == null)
                {
                    dabi = new DocumentAttributesBankInfoModel(this);
                }
            }
            else if (tb_DocumentAttributesRef.IsSelected)
            {
                if (dar == null)
                {
                    dar = new DocumentAttributesRefModel(this);
                }
            }
        }