コード例 #1
0
 private void GetGirdViewData()
 {
     try
     {
         accountTransactionService = new AccountTransactionService();
         int      firmId          = Convert.ToInt32(comboFirm.SelectedValue);
         int      accountId       = Convert.ToInt32(comboAccount.SelectedValue);
         DateTime transactionDate = dtTransactionDate.Value;
         var      data            = accountTransactionService.GetTodayTransactionData(firmId, accountId, transactionDate);
         gridAccountTransactions.DataSource = data;
         gridAccountTransactions.Columns["TransactionDate"].DefaultCellStyle.Format = "dd-MM-yyyy";
         gridAccountTransactions.Columns["Id"].Visible      = false;
         gridAccountTransactions.Columns["Remarks"].Visible = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, Comman.Product_Name, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }