Ejemplo n.º 1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     NewDepositForm ndf = new NewDepositForm(null, fre);
     if(ndf.ShowDialog() == DialogResult.OK)
     {
         deposits dp = ndf.NewDeposit;
         bank_account ba = bank_account.SingleOrDefault(dp.account_id);
         dp.account = String.Format("{0} - {1}", ba.agency, ba.account);
         dp.customer_name = customer.SingleOrDefault(dp.customer_id).corporate_name;
         dp.type_name = dp.type == 0 ? "Dinheiro" : "Cheque";
         dp.truck_board = truck.SingleOrDefault(dp.truck_id).board;
         bdgDeposits.Add(dp);
     }
 }
Ejemplo n.º 2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            NewDepositForm ndf = new NewDepositForm(null, fre);

            if (ndf.ShowDialog() == DialogResult.OK)
            {
                deposits     dp = ndf.NewDeposit;
                bank_account ba = bank_account.SingleOrDefault(dp.account_id);
                dp.account       = String.Format("{0} - {1}", ba.agency, ba.account);
                dp.customer_name = customer.SingleOrDefault(dp.customer_id).corporate_name;
                dp.type_name     = dp.type == 0 ? "Dinheiro" : "Cheque";
                dp.truck_board   = truck.SingleOrDefault(dp.truck_id).board;
                bdgDeposits.Add(dp);
            }
        }