Exemplo n.º 1
0
        private void datGridSavingsDetails_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            string savingsID     = string.Empty;
            string savingSource  = string.Empty;
            string transactionID = string.Empty;

            //MessageBox.Show(e.ColumnIndex.ToString());
            if (e.ColumnIndex == 0)
            {
                savingsID     = datGridSavingsDetails.Rows[e.RowIndex].Cells[1].Value.ToString();
                savingSource  = datGridSavingsDetails.Rows[e.RowIndex].Cells[5].Value.ToString();
                transactionID = datGridSavingsDetails.Rows[e.RowIndex].Cells[9].Value.ToString();
            }
            else if (e.ColumnIndex == 10)
            {
                savingsID     = datGridSavingsDetails.Rows[e.RowIndex].Cells[0].Value.ToString();
                savingSource  = datGridSavingsDetails.Rows[e.RowIndex].Cells[4].Value.ToString();
                transactionID = datGridSavingsDetails.Rows[e.RowIndex].Cells[8].Value.ToString();
            }

            if (e.ColumnIndex == 0 || e.ColumnIndex == 10)
            {
                ViewSavingsDetails viewSavingsDetails = new ViewSavingsDetails(savingsID, savingSource, transactionID);
                //MessageBox.Show("Saving Source: " + savingSource + "\nSavings ID: " + savingSource + "\nTransactionID " + transactionID);
                viewSavingsDetails.MdiParent = this.ParentForm;
                viewSavingsDetails.Show();
            }
        }
Exemplo n.º 2
0
 private void dtGrdVwSavingsForward_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 6)
     {
         string             savingsID          = dtGrdVwSavingsForward.Rows[e.RowIndex].Cells[0].Value.ToString();
         string             savingSource       = "SavingsForward";
         string             transactionID      = dtGrdVwSavingsForward.Rows[e.RowIndex].Cells[4].Value.ToString();
         ViewSavingsDetails viewSavingsDetails = new ViewSavingsDetails(savingsID, savingSource, transactionID);
         viewSavingsDetails.MdiParent = this.ParentForm;
         viewSavingsDetails.Show();
     }
 }