Exemple #1
0
        public frmRefundTypeMappings(IList <RefundTypeMappingDTO> refundMappingTypeDTOs)
        {
            InitializeComponent();


            checkBoxIssueRefundCheck.DataBindings.Add(new Binding("Checked", refundTypeMappingDTOBindingSource, "IssueCheck", true, DataSourceUpdateMode.OnPropertyChanged));
            checkBoxEnabled.DataBindings.Add(new Binding("Checked", refundTypeMappingDTOBindingSource, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged));
            checkBoxIssueRefundCheck.DataBindings.Add(new Binding("Enabled", refundTypeMappingDTOBindingSource, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged));

            comboBoxCheckRecipient.DataBindings.Add(new Binding("Enabled", refundTypeMappingDTOBindingSource, "EnableCheckField", true, DataSourceUpdateMode.OnPropertyChanged));
            comboBoxCheckRecipient.DataBindings.Add(new Binding("SelectedItem", refundTypeMappingDTOBindingSource, "RefundCheckRecipient"));

            comboBoxQBFrom.DataBindings.Add(new Binding("Enabled", refundTypeMappingDTOBindingSource, "EnableFromField", true, DataSourceUpdateMode.OnPropertyChanged));
            comboBoxQBPaymentType.DataBindings.Add(new Binding("Enabled", refundTypeMappingDTOBindingSource, "EnableQuickbooksPayTypeField", true, DataSourceUpdateMode.OnPropertyChanged));
            comboBoxQBIncomeAccount.DataBindings.Add(new Binding("Enabled", refundTypeMappingDTOBindingSource, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged));
            comboBoxRefundBankAccount.DataBindings.Add(new Binding("Enabled", refundTypeMappingDTOBindingSource, "EnableBankAccountField", true, DataSourceUpdateMode.OnPropertyChanged));

            comboBoxCheckRecipient.DataSource = Enum.GetValues(typeof(RefundCheckRecipient));

            Configuration configuration = UserSettings.getInstance().Configuration;

            quickbooksPaytypeBindingSource.DataSource       = configuration.QuickbooksPaytypes;
            quickbooksCustomerBindingSource.DataSource      = configuration.QuickbooksCustomers;
            quickbooksIncomeAccountBindingSource.DataSource = configuration.QuickbooksIncomeAccounts;
            quickbooksBankAccountBindingSource.DataSource   = configuration.QuickbooksBankAccounts;
            refundTypeMappingDTOBindingSource.DataSource    = refundMappingTypeDTOs.OrderBy(x => x.EaglesoftAdjustment);
        }
Exemple #2
0
        public frmPayTypeMappings(List <PaytypeMappingDTO> paytypeMappingDTOs)
        {
            Configuration configuration = UserSettings.getInstance().Configuration;

            InitializeComponent();

            // The order of these is important. If we setup the paytypeMappingDTOBindingSource first, the others will not correctly select the valuemember.
            comboQbAccount.DataSource = configuration.QuickbooksIncomeAccounts;
            comboQbFrom.DataSource    = configuration.QuickbooksCustomers;
            comboQbPayType.DataSource = configuration.QuickbooksPaytypes;
            paytypeMappingDTOBindingSource.DataSource = paytypeMappingDTOs;
        }