/// <summary> /// Gets the PaymentItems Details /// </summary> /// <returns>The dataset containing the comments.</returns> public static MakeDepositsData GetPaymentItemsDetails() { MakeDepositsData makeDepositsData = new MakeDepositsData(); Hashtable ht = new Hashtable(); string[] tableName = new string[] { makeDepositsData.ListPaymentItemTable.TableName, makeDepositsData.ListAccountsGridTable.TableName }; Utility.LoadDataSet(makeDepositsData, "f1212_pclst_PaymentItem", ht, tableName); return(makeDepositsData); }
/// <summary> /// Loads the afiidavit list grid. /// </summary> private void LoadPaymentItemsGrid() { this.paymentRowCount = 0; this.accountRowCount = 0; this.makeDepositsDataSet = this.Form1212Controll.WorkItem.GetPaymentItemsDetails(); this.PaymentRowCount = this.makeDepositsDataSet.ListPaymentItemTable.Rows.Count; this.AccountRowCount = this.makeDepositsDataSet.ListAccountsGridTable.Rows.Count; this.CustomizePaymentItemsDataGrid(); this.AddCheckBoxColumn(); this.totalRecCount = this.makeDepositsDataSet.ListPaymentItemTable.Rows.Count; this.PaymentItemsGrid.DataSource = this.makeDepositsDataSet.ListPaymentItemTable; this.AccountsGridView.DataSource = this.makeDepositsDataSet.ListAccountsGridTable; this.SetGridSummeries(); if (this.PaymentRowCount == 0) { this.DepositButton.Enabled = false; this.PaymentItemsGrid.Enabled = false; this.MakeDepositHelpSmartPart.Focus(); ////this.PaymentItemsGrid.Rows[0].Selected = false; ////this.PaymentItemsGrid.CurrentCell = null; } else { this.PaymentItemsGrid.Enabled = true; this.PaymentItemsGrid.Rows[0].Selected = true; } if (this.makeDepositsDataSet.ListPaymentItemTable.Rows.Count > this.PaymentItemsGrid.NumRowsVisible) { this.PaymentItmesVScrollBar.Enabled = true; this.PaymentItmesVScrollBar.Visible = false; } else { this.PaymentItmesVScrollBar.Enabled = false; this.PaymentItmesVScrollBar.Visible = true; } if (this.AccountRowCount == 0) { this.DepositButton.Enabled = false; } else { DataRow[] dataRow; bool defaultValue = true; string findExp = "IsDefault =" + defaultValue.ToString(); dataRow = this.makeDepositsDataSet.ListAccountsGridTable.Select(findExp); if (dataRow.Length > 0) { int rowIndex = this.makeDepositsDataSet.ListAccountsGridTable.Rows.IndexOf(dataRow[0]); TerraScanCommon.SetDataGridViewPosition(this.AccountsGridView, rowIndex); this.AccountsGridView.CurrentRow.Selected = true; this.regId = Convert.ToInt32(dataRow[0][this.makeDepositsDataSet.ListAccountsGridTable.RegisterIDColumn]); } else { TerraScanCommon.SetDataGridViewPosition(this.AccountsGridView, 0); this.regId = Convert.ToInt32(this.makeDepositsDataSet.ListAccountsGridTable.Rows[0][this.makeDepositsDataSet.ListAccountsGridTable.RegisterIDColumn]); } } if (this.makeDepositsDataSet.ListAccountsGridTable.Rows.Count > this.AccountsGridView.NumRowsVisible) { this.AccountsVScorrlBar.Enabled = true; this.AccountsVScorrlBar.Visible = false; } else { this.AccountsVScorrlBar.Enabled = false; this.AccountsVScorrlBar.Visible = true; } }