Example #1
0
 void receptionInfoCard_OnShowClientsButtonClicked(object source, ShowClientsEventsArgs e)
 {
     //тут логика показа формы с выбором клиента
     using (FindClientCard FindClientForm = new FindClientCard(clientList, entityFactory))
     {
         FindClientForm.SelectedClient = clientList.FindClientByPartialTelephone(e.Telephone) ?? clientList.FindClientByPartialName(e.Name);
         FindClientForm.ShowDialog();
         currentReception.Client = FindClientForm.SelectedClient;
         if (currentReception.Client != null)
         {
             receptionInfoCard.ClientOnReception = currentReception.Client;
         }
     }
 }
Example #2
0
        private void txtTelephone_TextChanged(object sender, EventArgs e)
        {
            IClient curClient = null;

            if (txtTelephone.Text.Length > 3 && !String.IsNullOrWhiteSpace(txtTelephone.Text))
            {
                curClient = clientList.FindClientByPartialTelephone(txtTelephone.Text);
            }
            if (curClient != null)
            {
                lstClientList.SelectedItem = curClient;
            }
            else
            {
                lstClientList.SelectedIndex = -1;
            }
        }