private void BtnView_Click(object sender, EventArgs e) { // get the currently selected row DataRow CurrentlySelectedRow = GetCurrentDataRow(); if (CurrentlySelectedRow != null) { try { this.Cursor = Cursors.WaitCursor; TFrmGLBatch GLb = new TFrmGLBatch(this); GLb.LedgerNumber = FLedgerNumber; GLb.ShowDetailsOfOneBatch(FLedgerNumber, (int)CurrentlySelectedRow["a_batch_number_i"], (int)CurrentlySelectedRow["a_journal_number_i"], (int)CurrentlySelectedRow["a_batch_year_i"], (int)CurrentlySelectedRow["a_batch_period_i"]); GLb.SelectTab(TFrmGLBatch.eGLTabs.Journals); GLb.SelectTab(TFrmGLBatch.eGLTabs.Transactions); GLb.FindGLTransaction((int)CurrentlySelectedRow["a_batch_number_i"], (int)CurrentlySelectedRow["a_journal_number_i"], (int)CurrentlySelectedRow["a_transaction_number_i"]); } finally { this.Cursor = Cursors.Default; } } }
private void BtnView_Click(object sender, EventArgs e) { // get the currently selected row DataRow CurrentlySelectedRow = GetCurrentDataRow(); if (CurrentlySelectedRow != null) { try { this.Cursor = Cursors.WaitCursor; TFrmGLBatch GLb = new TFrmGLBatch(this); GLb.LedgerNumber = FLedgerNumber; GLb.ShowDetailsOfOneBatch(FLedgerNumber, (int)CurrentlySelectedRow["a_batch_number_i"], (int)CurrentlySelectedRow["a_journal_number_i"], (int)CurrentlySelectedRow["a_batch_year_i"], (int)CurrentlySelectedRow["a_batch_period_i"]); GLb.SelectTab(TFrmGLBatch.eGLTabs.Journals); GLb.SelectTab(TFrmGLBatch.eGLTabs.Transactions); GLb.FindGLTransaction((int)CurrentlySelectedRow["a_batch_number_i"], (int)CurrentlySelectedRow["a_journal_number_i"], (int)CurrentlySelectedRow["a_transaction_number_i"]); } finally { this.Cursor = Cursors.Default; } } }