示例#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;
            }
        }
示例#2
0
        private void GetParticular()
        {
            try
            {
                DataSet dtResult = new DataSet();
                transaction = new BIZ.Transaction();
                PopulateBLL();

                dtResult = transaction.GetParticular();
                cmbParticular.Items.Clear();
                if (dtResult.Tables.Count > 0)
                {
                    if (dtResult.Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow item in dtResult.Tables[0].Rows)
                        {
                            cmbParticular.Items.Add(item["DESCRIPTION"].ToString());
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#3
0
        private void grid_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                DataGridView datagrid = this.dtTransactionDetailsList;
                Int64        index;
                Int64        colIndex;
                if (datagrid.RowCount > 0)
                {
                    transaction = new BIZ.Transaction();
                    index       = datagrid.CurrentRow.Index;
                    colIndex    = datagrid.CurrentCell.ColumnIndex;
                    if (colIndex == 5)
                    {
                        TransactionID = Convert.ToInt64(datagrid.Rows[Convert.ToInt32(index)].Cells[0].Value);
                        if (TransactionID > 0)
                        {
                            DataSet dtresult = new DataSet();
                            PopulateBLL();
                            dtresult = transaction.TransactionGetByKey();

                            if (dtresult.Tables.Count > 0)
                            {
                                if (dtresult.Tables[0].Rows.Count > 0)
                                {
                                    RecordSearched = dtresult.Tables[0];
                                    PopulateControl();
                                }
                            }
                            else
                            {
                                MessageBox.Show("No record is found", "Search");
                            }
                        }
                    }
                    else if (colIndex == 6)
                    {
                        TransactionID = Convert.ToInt64(datagrid.Rows[Convert.ToInt32(index)].Cells[0].Value);
                        if (TransactionID > 0)
                        {
                            if (MessageBox.Show("Are you sure you would like to delete this transaction?", "Delete Record", MessageBoxButtons.YesNo) == DialogResult.Yes)
                            {
                                transaction.TransactionID = TransactionID;
                                transaction.TransactionDelete();
                                ClearControl();
                                TransactionGetByBillingNo();
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
            }
        }
示例#4
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                DataSet ds = new DataSet();
                transaction        = new BIZ.Transaction();
                transaction.ClubID = ClubID;
                transaction.UserID = UserID;

                if (txtMobileNumber.Text.Length != 11)
                {
                    MessageBox.Show("Invalid Mobile Number");
                }
                else if (txtPinNumber.Text.Length == 0)
                {
                    MessageBox.Show("Invalid MemberID No.");
                }
                else
                {
                    transaction.MobileNumber = txtMobileNumber.Text;
                    transaction.PinNumber    = txtPinNumber.Text;
                    ds = transaction.RegisterMobileNumber();

                    if (ds.Tables.Count > 0)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            MessageBox.Show(ds.Tables[0].Rows[0]["ReplyMessage"].ToString(), "Message");

                            if (ds.Tables[0].Rows[0]["IsValid"].ToString() == "1")
                            {
                                txtMobileNumber.Text = "";
                                txtPinNumber.Text    = "";
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
            }
        }
示例#5
0
        private void Save()
        {
            try
            {
                transaction = new BIZ.Transaction();
                PopulateBLL();

                if (transaction.Save())
                {
                    MessageBox.Show("Transaction Record Save.", "Error");
                    ClearControl();
                    TransactionGetByBillingNo();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#6
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");
            }
        }
示例#7
0
        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;
            }
        }
示例#8
0
        private void GetBillingNo()
        {
            try
            {
                transaction = new BIZ.Transaction();
                DataSet dtResult = new DataSet();

                dtResult = transaction.GetBillingNumber();

                if (dtResult.Tables.Count > 0)
                {
                    if (dtResult.Tables[0].Rows.Count > 0)
                    {
                        txtBillingNo.Text = dtResult.Tables[0].Rows[0]["BillingNo"].ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#9
0
        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");
            }
        }