private void BtnView_Click(object sender, EventArgs e) { // get the currently selected row DataRow CurrentlySelectedRow = GetCurrentDataRow(); if (CurrentlySelectedRow != null) { try { this.Cursor = Cursors.WaitCursor; TFrmGiftBatch gb = new TFrmGiftBatch(this); // load dataset with data for whole transaction (all details) gb.ViewModeTDS = TRemote.MFinance.Gift.WebConnectors.LoadAGiftSingle(FLedgerNumber, (int)CurrentlySelectedRow["a_batch_number_i"], (int)CurrentlySelectedRow["a_gift_transaction_number_i"]); if (gb.ViewModeTDS.AGiftBatch[0].BatchStatus == MFinanceConstants.BATCH_POSTED) { // read only if gift belongs to a posted batch gb.ViewMode = true; gb.ShowDetailsOfOneBatch(FLedgerNumber, (int)CurrentlySelectedRow["a_batch_number_i"], gb.ViewModeTDS.AGiftBatch[0].BatchYear, gb.ViewModeTDS.AGiftBatch[0].BatchPeriod); } else { gb.ShowDetailsOfOneBatch(FLedgerNumber, (int)CurrentlySelectedRow["a_batch_number_i"], gb.ViewModeTDS.AGiftBatch[0].BatchYear, gb.ViewModeTDS.AGiftBatch[0].BatchPeriod); gb.DisableBatches(); } gb.SelectTab(TFrmGiftBatch.eGiftTabs.Transactions); gb.FindGiftDetail((AGiftDetailRow)gb.ViewModeTDS.AGiftDetail.Rows.Find( new object[] { FLedgerNumber, CurrentlySelectedRow["a_batch_number_i"], CurrentlySelectedRow["a_gift_transaction_number_i"], CurrentlySelectedRow["a_detail_number_i"] })); } finally { this.Cursor = Cursors.Default; } } }
private void ViewTransaction(object sender, EventArgs e) { // get the currently selected row FPreviouslySelectedDetailRow = GetSelectedDetailRow(); if ((FPreviouslySelectedDetailRow != null) && (FMainDS != null)) { try { this.Cursor = Cursors.WaitCursor; TFrmGiftBatch gb = new TFrmGiftBatch(this); gb.LedgerNumber = FLedgerNumber; // load dataset with data for whole transaction (all details) // Viewmode = true /*gb.ViewModeTDS = TRemote.MFinance.Gift.WebConnectors.LoadAGiftSingle(FLedgerNumber, * (int)FPreviouslySelectedDetailRow["BatchNumber"], * (int)FPreviouslySelectedDetailRow["GiftTransactionNumber"]); * * if (gb.ViewModeTDS.AGiftBatch[0].BatchStatus == MFinanceConstants.BATCH_POSTED) * { * // read only if gift belongs to a posted batch * gb.ViewMode = true; * gb.ShowDetailsOfOneBatch(FLedgerNumber, (int)FPreviouslySelectedDetailRow["BatchNumber"], * gb.ViewModeTDS.AGiftBatch[0].BatchYear, gb.ViewModeTDS.AGiftBatch[0].BatchPeriod); * } * else * { * gb.ShowDetailsOfOneBatch(FLedgerNumber, (int)FPreviouslySelectedDetailRow["BatchNumber"], * gb.ViewModeTDS.AGiftBatch[0].BatchYear, gb.ViewModeTDS.AGiftBatch[0].BatchPeriod); * gb.DisableBatches(); * }*/ // Viewmode = false gb.ShowDetailsOfOneBatch(FLedgerNumber, (int)FPreviouslySelectedDetailRow["BatchNumber"], (int)FPreviouslySelectedDetailRow["BatchYear"], (int)FPreviouslySelectedDetailRow["BatchPeriod"]); gb.SelectTab(TFrmGiftBatch.eGiftTabs.Transactions); gb.FindGiftDetail((int)FPreviouslySelectedDetailRow["BatchNumber"], (int)FPreviouslySelectedDetailRow["GiftTransactionNumber"], (int)FPreviouslySelectedDetailRow["DetailNumber"]); } 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; TFrmGiftBatch gb = new TFrmGiftBatch(this); gb.LedgerNumber = FLedgerNumber; // load dataset with data for whole transaction (all details) // Viewmode = true /*gb.ViewModeTDS = TRemote.MFinance.Gift.WebConnectors.LoadAGiftSingle(FLedgerNumber, * (int)CurrentlySelectedRow["a_batch_number_i"], * (int)CurrentlySelectedRow["a_gift_transaction_number_i"]); * * if (gb.ViewModeTDS.AGiftBatch[0].BatchStatus == MFinanceConstants.BATCH_POSTED) * { * // read only if gift belongs to a posted batch * gb.ViewMode = true; * gb.ShowDetailsOfOneBatch(FLedgerNumber, (int)CurrentlySelectedRow["a_batch_number_i"], * gb.ViewModeTDS.AGiftBatch[0].BatchYear, gb.ViewModeTDS.AGiftBatch[0].BatchPeriod); * } * else * { * gb.ShowDetailsOfOneBatch(FLedgerNumber, (int)CurrentlySelectedRow["a_batch_number_i"], * gb.ViewModeTDS.AGiftBatch[0].BatchYear, gb.ViewModeTDS.AGiftBatch[0].BatchPeriod); * gb.DisableBatches(); * }*/ // Viewmode = false gb.ShowDetailsOfOneBatch(FLedgerNumber, (int)CurrentlySelectedRow["a_batch_number_i"], (int)CurrentlySelectedRow["a_batch_year_i"], (int)CurrentlySelectedRow["a_batch_period_i"]); gb.SelectTab(TFrmGiftBatch.eGiftTabs.Transactions); gb.FindGiftDetail((int)CurrentlySelectedRow["a_batch_number_i"], (int)CurrentlySelectedRow["a_gift_transaction_number_i"], (int)CurrentlySelectedRow["a_detail_number_i"]); } finally { this.Cursor = Cursors.Default; } } }
private void ViewTransaction(object sender, EventArgs e) { // get the currently selected row FPreviouslySelectedDetailRow = GetSelectedDetailRow(); if ((FPreviouslySelectedDetailRow != null) && (FMainDS != null)) { try { this.Cursor = Cursors.WaitCursor; TFrmGiftBatch gb = new TFrmGiftBatch(this); // load dataset with data for whole transaction (all details) gb.ViewModeTDS = TRemote.MFinance.Gift.WebConnectors.LoadAGiftSingle(FLedgerNumber, (int)FPreviouslySelectedDetailRow["BatchNumber"], (int)FPreviouslySelectedDetailRow["GiftTransactionNumber"]); if (gb.ViewModeTDS.AGiftBatch[0].BatchStatus == MFinanceConstants.BATCH_POSTED) { // read only if gift belongs to a posted batch gb.ViewMode = true; gb.ShowDetailsOfOneBatch(FLedgerNumber, (int)FPreviouslySelectedDetailRow["BatchNumber"], gb.ViewModeTDS.AGiftBatch[0].BatchYear, gb.ViewModeTDS.AGiftBatch[0].BatchPeriod); } else { gb.ShowDetailsOfOneBatch(FLedgerNumber, (int)FPreviouslySelectedDetailRow["BatchNumber"], gb.ViewModeTDS.AGiftBatch[0].BatchYear, gb.ViewModeTDS.AGiftBatch[0].BatchPeriod); gb.DisableBatches(); } gb.SelectTab(TFrmGiftBatch.eGiftTabs.Transactions); gb.FindGiftDetail((AGiftDetailRow)gb.ViewModeTDS.AGiftDetail.Rows.Find( new object[] { FLedgerNumber, FPreviouslySelectedDetailRow["BatchNumber"], FPreviouslySelectedDetailRow["GiftTransactionNumber"], FPreviouslySelectedDetailRow["DetailNumber"] })); } finally { this.Cursor = Cursors.Default; } } }