Beispiel #1
0
        private void btnNewCustomer_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            var dialogResult = new CustomerManager().ShowDialog();
            if (dialogResult == System.Windows.Forms.DialogResult.OK)
            {
                // El usuario ha creado un cliente nuevo
                // hay que devolverlo hasta el manager principal

            }
            else
            {
                this.Visible = true;
            }
        }
 private void btnCustomerName_Properties_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     if (e.Button.Kind == DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis)
     {
         // Search Customer Process
         loadCustomerFinder();
     }
     else
     {
         // Add new customer
         var createCustomerDialog = new CustomerManager();
         if (createCustomerDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             // load the found client
             loadCustomer(createCustomerDialog.Tag as CustomerDto);
         }
     }
 }