Ejemplo n.º 1
0
        private void TransactionGetByBillingNo()
        {
            try
            {
                transaction = new BIZ.Transaction();
                PopulateBLL();

                DataSet dtResult = new DataSet();

                dtResult = transaction.TransactionGetByBillingNo();

                if (dtResult.Tables.Count > 0)
                {
                    if (dtResult.Tables[0].Rows.Count > 0)
                    {
                        txtTotalAmount.Text             = string.Format("{0:#,##0.00}", Convert.ToDecimal(dtResult.Tables[0].Rows[0]["TotalAmount"]));
                        txtPayment.Text                 = string.Format("{0:#,##0.00}", Convert.ToDecimal(dtResult.Tables[0].Rows[0]["TotalPayment"]));
                        txtBalance.Text                 = string.Format("{0:#,##0.00}", Convert.ToDecimal(dtResult.Tables[0].Rows[0]["Balance"]));
                        txtPreviousBalance.Text         = string.Format("{0:#,##0.00}", Convert.ToDecimal(dtResult.Tables[0].Rows[0]["PreviousBalance"]));
                        cmbClub.SelectedItem            = dtResult.Tables[0].Rows[0]["ClubName"].ToString();
                        cmbTransactionType.SelectedItem = dtResult.Tables[0].Rows[0]["TransactionType"].ToString();
                        BillingStatementDetails         = dtResult.Tables[0];
                    }
                    dtTransactionDetailsList.DataSource = dtResult.Tables[1];
                    dtBillingSummary.DataSource         = dtResult.Tables[2];
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        private void grid_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                DataGridView datagrid = this.dataGridView1;
                Int64        index;
                Int64        colIndex;
                String       BillingNo;
                if (datagrid.RowCount > 0)
                {
                    transaction = new BIZ.Transaction();
                    index       = datagrid.CurrentRow.Index;
                    colIndex    = datagrid.CurrentCell.ColumnIndex;
                    if (colIndex == 4)
                    {
                        BillingNo = Convert.ToString(datagrid.Rows[Convert.ToInt32(index)].Cells[0].Value);
                        if (BillingNo != "")
                        {
                            DataSet dtresult = new DataSet();
                            transaction.BillingNumber = BillingNo;
                            transaction.IsTranDetails = true;
                            dtresult = transaction.TransactionGetByBillingNo();

                            if (dtresult.Tables.Count > 0)
                            {
                                frmTransactionDetails transactionDetails = new frmTransactionDetails();
                                transactionDetails.DTTransactionDetails = dtresult.Tables[1];
                                transactionDetails.ShowDialog();
                            }
                            else
                            {
                                MessageBox.Show("No record is found", "Search");
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
            }
        }