Exemple #1
0
        private void IncomeForm_Load(object sender, EventArgs e)
        {
            grvIncome.CellEnter += grvIncome_CellEnter;

            cboxFromBankAccountFind.DataSource    = bankAccountTableAdapter.GetBankAccountFillToComboBox();
            cboxFromBankAccountFind.DisplayMember = Constant.BankAccount.Bank_Account_Name_Column_Name;
            cboxFromBankAccountFind.ValueMember   = Constant.BankAccount.Bank_Account_Id_Column_Name;

            if (isOpenedByBankAccountManagementForm || isOpenedByCashManagementForm)
            {
                cboxPaymentMethod.SelectedItem = paymentMethodName;
            }

            cboxFromBankAccount.DataSource    = bankAccountTableAdapter.GetBankAccountFillToComboBox();
            cboxFromBankAccount.DisplayMember = Constant.BankAccount.Bank_Account_Name_Column_Name;
            cboxFromBankAccount.ValueMember   = Constant.BankAccount.Bank_Account_Id_Column_Name;

            if (isOpenedByBankAccountManagementForm)
            {
                cboxFromBankAccount.SelectedValue = selectedFromBankAccountId;
            }

            this.WindowState = FormWindowState.Maximized;

            if (incomeId != 0)
            {
                BindDataToEdit(incomeId);
            }
        }
        private void ReceivableFromCustomersForm_Load(object sender, EventArgs e)
        {
            cboxBankAccount.DataSource    = bankAccountTableAdapter.GetBankAccountFillToComboBox();
            cboxBankAccount.DisplayMember = Constant.BankAccount.Bank_Account_Name_Column_Name;
            cboxBankAccount.ValueMember   = Constant.BankAccount.Bank_Account_Id_Column_Name;
            cboxBankAccount.SelectedValue = bankAccountIdPassFromOtherControl;
            int bankAccountId = 0;

            bankAccountId = int.Parse(cboxBankAccount.SelectedValue.ToString());
            grvReceivableFromCustomer.DataSource = receivableCustomerAdapter.GetReceivableFromCustomersByCustIdBillNumberIsInDebt(int.Parse(lbCustId.Text), txtBillNumber.Text, chkIsInDebt.Checked, dateTimePickerFrom.Value, dateTimePickerTo.Value, bankAccountId);
            grvReceivableFromCustomer.CellEnter += grvReceivableFromCustomer_CellEnter;

            cboxBankAccount.SelectedIndexChanged += cboxBankAccount_SelectedIndexChanged;
        }
Exemple #3
0
 private void BankAccountManagementForm_Load(object sender, EventArgs e)
 {
     cboxBankAccount.DataSource    = bankAccountTableAdapter.GetBankAccountFillToComboBox();
     cboxBankAccount.DisplayMember = Constant.BankAccount.Bank_Account_Name_Column_Name;
     cboxBankAccount.ValueMember   = Constant.BankAccount.Bank_Account_Id_Column_Name;
 }