private void InitializeCustomComponents()
        {
            tableLayoutPanelAA = FormUtility.CreateTableLayoutPanel(1000, 200);
            FormUtility.AddValidation(buttonSubmit, textBoxCurrency, () =>
            {
                TableUtility tableUtility  = new TableUtility();
                List <Range> currencyRange = tableUtility.ReadTableRow(Currency.GetDefaultValue(), new Dictionary <string, string>
                {
                    { "IsoCode", textBoxCurrency.Text.ToUpper() }
                }, QueryOperator.OR);

                if (currencyRange.Count == 0 || currencyRange.Count > 1)
                {
                    textBoxCurrency.BackColor = Color.Red;
                    return(false);
                }
                if (MergeFundProperties() && MergeAssetAllocation())
                {
                    passedForm.OnSubmit();
                    Close();
                }
                return(true);
            });
            FormUtility.AddControlsToForm(this, tableLayoutPanelAA);
        }
示例#2
0
 private void ButtonOk_Click(object sender, EventArgs e)
 {
     if (textBox1.TextLength < 1)
     {
         MessageBox.Show("Feld darf nicht leer sein.");
         return;
     }
     originalForm.OnSubmit(new List <string> {
         textBox1.Text
     }, reference);
     Close();
 }