本文介绍了避免同时单击按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在我的应用程序中,我具有搜索顺序"的搜索"按钮.当我输入订单号和订单类型并单击提交按钮时,它将显示该订单号的文档.但是,应用程序的问题是当我同时单击搜索"按钮时它会复制数据.单击多个按钮上的数据.

谢谢,
乌梅什·塔亚德

Hi,

In my application i have Search button for Search Order. When i enter the Order no and order type and click submit button then it shows the documents for that order no.But,The Problem with the application is when i click the Search button simultaneously it replicates the data.I want to avoid the replication of the data on multiple button click.

Thanks,
Umesh Tayade

<Button Content="Search"  Margin="5,0,0,0" Height="21" Width="100" Grid.Row="0" Grid.Column="9" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{StaticResource grayButton}" x:Name="btnSearch" Click="btnSearch_Click"/> 





private void btnSearch_Click(object sender, RoutedEventArgs e)
{
   if (IsValid() && isLineValid)
   {
      if (null != multiDocViewModelConnector.ViewState && multiDocViewModelConnector.ViewState.FilterDescripter != null)
                    multiDocViewModelConnector.ViewState.FilterDescripter.Clear();
      __searchCriteria();
   }
  }

推荐答案


这篇关于避免同时单击按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 14:42
查看更多