private void TransactionGetByClub() { try { transaction = new BIZ.Transaction(); DataSet dtResult = new DataSet(); transaction.ClubName = ClubName; transaction.ClubID = ClubID; dtResult = transaction.PaymentHistory(); if (dtResult.Tables.Count > 0) { dataGridView1.DataSource = dtResult.Tables[0]; } } catch (Exception ex) { throw ex; } }
private void dtBillingSummary_DoubleClick(object sender, EventArgs e) { try { DataGridView datagrid = this.dtBillingSummary; Int64 index; Int64 colIndex; if (datagrid.RowCount > 0) { transaction = new BIZ.Transaction(); index = datagrid.CurrentRow.Index; colIndex = datagrid.CurrentCell.ColumnIndex; if (colIndex == 6) { ClubName = Convert.ToString(datagrid.Rows[Convert.ToInt32(index)].Cells[0].Value); if (ClubName != "") { DataSet dtresult = new DataSet(); //PopulateBLL(); transaction.ClubName = ClubName; dtresult = transaction.TransactionHistory(); if (dtresult.Tables.Count > 0) { frmTransactionSummary transactionhistory = new frmTransactionSummary(); transactionhistory.ClubName = ClubName; transactionhistory.ShowDialog(); } else { MessageBox.Show("No record is found", "Search"); } } } if (colIndex == 7) { ClubName = Convert.ToString(datagrid.Rows[Convert.ToInt32(index)].Cells[0].Value); if (ClubName != "") { DataSet dtresult = new DataSet(); //PopulateBLL(); transaction.ClubName = ClubName; dtresult = transaction.PaymentHistory(); if (dtresult.Tables.Count > 0) { frmPaymentTransactionSummary paymentSummary = new frmPaymentTransactionSummary(); paymentSummary.ClubName = ClubName; paymentSummary.ShowDialog(); } else { MessageBox.Show("No record is found", "Search"); } } } } } catch (Exception ex) { MessageBox.Show(Common.Common.CustomError(ex.Message), "Error"); } }