コード例 #1
0
        //Search client
        private void SearchClientBT_Click(object sender, RoutedEventArgs e)
        {
            //Search client value
            var Data = NovaAPI.APIClient.clients.Find(x => x.name.ToLower().Contains(ClientFilterTX.Text.ToLower()));

            //Clear data
            ClearForm();

            //Set Client data
            if (Data != null)
            {
                //Client found
                ClientFilterTX.Text = Data.name;
                SelectedClientID    = Data.id;
                SelectClient(Data);
                InProductBT.IsEnabled = true;
                InProductBT.Focus();
            }
            else
            {
                //Client not found
                ClearForm();
                ClientFilterTX.Focus();
                ClientFilterTX.SelectAll();
            }
        }
コード例 #2
0
 private void ClientFilterTX_GotFocus(object sender, object e)
 {
     ClientFilterTX.SelectAll();
 }