コード例 #1
0
 private void selectCustomerButton_Click(object sender, System.EventArgs e)
 {
     using (CustomerSelector selector = new CustomerSelector())
     {
         var dialogResult = selector.ShowDialog(this);
         if (dialogResult == DialogResult.Cancel)
         {
             return;
         }
         SetCustomerAsCurrent(selector.SelectedCustomer);
     }
 }
コード例 #2
0
        private void selectCustomerButton_Click(object sender, System.EventArgs e)
        {
            CustomerSelector selector = new CustomerSelector();

            selector.ShowDialog(this);

            if (selector.CancelClicked)
            {
                return;
            }

            SetCustomerAsCurrent(selector.SelectedCustomer.CustomerId);
        }