private void chklstTMSResults_SelectedIndexChanged(object sender, EventArgs e)
 {
     //Process SummaryDetail response
     if (_lastSearch == LastSearchType.QueryTransactionsSummary)
     {
         if (chklstTMSResults.SelectedItem == null)
         {
             return;
         }
         SummaryDetail s = ((SummaryDetailVal)(chklstTMSResults.SelectedItem)).SD;
         txtTMSResults.Text = SummaryDetailString(s);
     }
     //Process FamilyDetail response
     if (_lastSearch == LastSearchType.QueryTransactionFamilies)
     {
         if (chklstTMSResults.SelectedItem == null)
         {
             return;
         }
         FamilyDetail f = ((FamilyDetailVal)(chklstTMSResults.SelectedItem)).FD;
         txtTMSResults.Text = FamilyDetailString(f);
     }
     //Process BatchDetailData response
     if (_lastSearch == LastSearchType.QueryBatch)
     {
         if (chklstTMSResults.SelectedItem == null)
         {
             return;
         }
         BatchDetailData b = ((BatchDetailDataVal)(chklstTMSResults.SelectedItem)).BDD;
         txtTMSResults.Text = BatchDetailDataString(b);
     }
     //Process TransactionDetail response
     if (_lastSearch == LastSearchType.QueryTransactionsDetail)
     {
         if (chklstTMSResults.SelectedItem == null)
         {
             return;
         }
         TransactionDetail t = ((TransactionDetailVal)(chklstTMSResults.SelectedItem)).TD;
         txtTMSResults.Text = TransactionDetailString(t);
     }
 }
 public BatchDetailDataVal(BatchDetailData bdd)
 {
     BDD = bdd;
 }
        private string BatchDetailDataString(BatchDetailData b)
        {
            int intPreviousIndex = -1;
            foreach (int itemChecked in chklstTMSResults.CheckedIndices)
            {
                intPreviousIndex = itemChecked;
                chklstTMSResults.SetItemChecked(itemChecked, false);
            }

            if (chklstTMSResults.SelectedIndex != intPreviousIndex)
                chklstTMSResults.SetItemChecked(chklstTMSResults.SelectedIndex, true);

            string strSummary = "";

            //Batch Summary
            strSummary = strSummary + "BatchCaptureDate : " + b.BatchCaptureDate + " (UTC)\r\n";
            strSummary = strSummary + "BatchId : " + b.BatchId + "\r\n";
            strSummary = strSummary + "Description : " + b.Description + "\r\n";
            //Batch Summary Data
            strSummary = strSummary + "Batch Summary Data";
            if (b.BatchSummaryData.CashBackTotals != null) strSummary = strSummary + "\r\nCash Back Totals \r\n  Count : " + b.BatchSummaryData.CashBackTotals.Count + "\r\n  Net Amount : " + b.BatchSummaryData.CashBackTotals.NetAmount;
            if (b.BatchSummaryData.NetTotals != null) strSummary = strSummary + "\r\nNet Totals \r\n  Count : " + b.BatchSummaryData.NetTotals.Count + "\r\n  Net Amount : " + b.BatchSummaryData.NetTotals.NetAmount;
            if (b.BatchSummaryData.PINDebitReturnTotals != null) strSummary = strSummary + "\r\nPINDebit Return Totals \r\n  Count : " + b.BatchSummaryData.PINDebitReturnTotals.Count + "\r\n  Net Amount : " + b.BatchSummaryData.PINDebitReturnTotals.NetAmount;
            if (b.BatchSummaryData.PINDebitSaleTotals != null) strSummary = strSummary + "\r\nPINDebit Sale Totals \r\n  Count : " + b.BatchSummaryData.PINDebitSaleTotals.Count + "\r\n  Net Amount : " + b.BatchSummaryData.PINDebitSaleTotals.NetAmount;
            if (b.BatchSummaryData.ReturnTotals != null) strSummary = strSummary + "\r\nReturn Totals \r\n  Count : " + b.BatchSummaryData.ReturnTotals.Count + "\r\n  Net Amount : " + b.BatchSummaryData.ReturnTotals.NetAmount;
            if (b.BatchSummaryData.SaleTotals != null) strSummary = strSummary + "\r\nSale Totals \r\n  Count : " + b.BatchSummaryData.SaleTotals.Count + "\r\n  Net Amount : " + b.BatchSummaryData.SaleTotals.NetAmount;
            if (b.BatchSummaryData.VoidTotals != null) strSummary = strSummary + "\r\nVoid Totals \r\n  Count : " + b.BatchSummaryData.VoidTotals.Count + "\r\n  Net Amount : " + b.BatchSummaryData.VoidTotals.NetAmount;
            //TransactionId
            strSummary = strSummary + "\r\nList of TransactionIds\r\n";
            if (b.TransactionIds != null)
            {
                foreach (string txnid in b.TransactionIds)
                {
                    strSummary = strSummary + txnid + "\r\n";
                }
            }
            strSummary = strSummary + "\r\n";
            return strSummary;
        }
 private void BatchDetailDataString(BatchDetailData b)
 {
     RtxtTMSResults.SelectionColor = Color.Black;
     //Batch Summary
     RtxtTMSResults.AppendText("BatchCaptureDate : " + b.BatchCaptureDate + " (UTC)\r\n");
     RtxtTMSResults.AppendText("BatchId : " + b.BatchId + "\r\n");
     RtxtTMSResults.AppendText("Capture State : " + b.CaptureState + "\r\n");
     RtxtTMSResults.AppendText("Description : " + b.Description + "\r\n");
     //Batch Summary Data
     if (b.SummaryData != null)
     {
         RtxtTMSResults.AppendText("Batch Summary Data");
         if (b.SummaryData.CashBackTotals != null) RtxtTMSResults.AppendText("\r\nCash Back Totals \r\n  Count : " + b.SummaryData.CashBackTotals.Count + "\r\n  Net Amount : " + b.SummaryData.CashBackTotals.NetAmount);
         if (b.SummaryData.CreditReturnTotals != null) RtxtTMSResults.AppendText("\r\nCredit Return Totals \r\n  Count : " + b.SummaryData.CreditReturnTotals.Count + "\r\n  Net Amount : " + b.SummaryData.CreditReturnTotals.NetAmount);
         if (b.SummaryData.CreditTotals != null) RtxtTMSResults.AppendText("\r\nCredit Totals \r\n  Count : " + b.SummaryData.CreditTotals.Count + "\r\n  Net Amount : " + b.SummaryData.CreditTotals.NetAmount);
         if (b.SummaryData.DebitReturnTotals != null) RtxtTMSResults.AppendText("\r\nDebit Return Totals \r\n  Count : " + b.SummaryData.DebitReturnTotals.Count + "\r\n  Net Amount : " + b.SummaryData.DebitReturnTotals.NetAmount);
         if (b.SummaryData.DebitTotals != null) RtxtTMSResults.AppendText("\r\nDebit Totals \r\n  Count : " + b.SummaryData.DebitTotals.Count + "\r\n  Net Amount : " + b.SummaryData.DebitTotals.NetAmount);
         if (b.SummaryData.NetTotals != null) RtxtTMSResults.AppendText("\r\nNet Totals \r\n  Count : " + b.SummaryData.NetTotals.Count + "\r\n  Net Amount : " + b.SummaryData.NetTotals.NetAmount);
         if (b.SummaryData.VoidTotals != null) RtxtTMSResults.AppendText("\r\nVoid Totals \r\n  Count : " + b.SummaryData.VoidTotals.Count + "\r\n  Net Amount : " + b.SummaryData.VoidTotals.NetAmount);
     }
     //TransactionId
     RtxtTMSResults.AppendText("\r\nList of TransactionIds\r\n");
     if (b.TransactionIds != null)
     {
         foreach (string txnid in b.TransactionIds)
         {
             RtxtTMSResults.AppendText(txnid + "\r\n");
         }
     }
     RtxtTMSResults.AppendText("\r\n");
 }
        private string BatchDetailDataString(BatchDetailData b)
        {
            int intPreviousIndex = -1;

            foreach (int itemChecked in chklstTMSResults.CheckedIndices)
            {
                intPreviousIndex = itemChecked;
                chklstTMSResults.SetItemChecked(itemChecked, false);
            }

            if (chklstTMSResults.SelectedIndex != intPreviousIndex)
            {
                chklstTMSResults.SetItemChecked(chklstTMSResults.SelectedIndex, true);
            }

            string strSummary = "";

            //Batch Summary
            strSummary = strSummary + "BatchCaptureDate : " + b.BatchCaptureDate + " (UTC)\r\n";
            strSummary = strSummary + "BatchId : " + b.BatchId + "\r\n";
            strSummary = strSummary + "Description : " + b.Description + "\r\n";
            //Batch Summary Data
            strSummary = strSummary + "Batch Summary Data";
            if (b.BatchSummaryData.CashBackTotals != null)
            {
                strSummary = strSummary + "\r\nCash Back Totals \r\n  Count : " + b.BatchSummaryData.CashBackTotals.Count + "\r\n  Net Amount : " + b.BatchSummaryData.CashBackTotals.NetAmount;
            }
            if (b.BatchSummaryData.NetTotals != null)
            {
                strSummary = strSummary + "\r\nNet Totals \r\n  Count : " + b.BatchSummaryData.NetTotals.Count + "\r\n  Net Amount : " + b.BatchSummaryData.NetTotals.NetAmount;
            }
            if (b.BatchSummaryData.PINDebitReturnTotals != null)
            {
                strSummary = strSummary + "\r\nPINDebit Return Totals \r\n  Count : " + b.BatchSummaryData.PINDebitReturnTotals.Count + "\r\n  Net Amount : " + b.BatchSummaryData.PINDebitReturnTotals.NetAmount;
            }
            if (b.BatchSummaryData.PINDebitSaleTotals != null)
            {
                strSummary = strSummary + "\r\nPINDebit Sale Totals \r\n  Count : " + b.BatchSummaryData.PINDebitSaleTotals.Count + "\r\n  Net Amount : " + b.BatchSummaryData.PINDebitSaleTotals.NetAmount;
            }
            if (b.BatchSummaryData.ReturnTotals != null)
            {
                strSummary = strSummary + "\r\nReturn Totals \r\n  Count : " + b.BatchSummaryData.ReturnTotals.Count + "\r\n  Net Amount : " + b.BatchSummaryData.ReturnTotals.NetAmount;
            }
            if (b.BatchSummaryData.SaleTotals != null)
            {
                strSummary = strSummary + "\r\nSale Totals \r\n  Count : " + b.BatchSummaryData.SaleTotals.Count + "\r\n  Net Amount : " + b.BatchSummaryData.SaleTotals.NetAmount;
            }
            if (b.BatchSummaryData.VoidTotals != null)
            {
                strSummary = strSummary + "\r\nVoid Totals \r\n  Count : " + b.BatchSummaryData.VoidTotals.Count + "\r\n  Net Amount : " + b.BatchSummaryData.VoidTotals.NetAmount;
            }
            //TransactionId
            strSummary = strSummary + "\r\nList of TransactionIds\r\n";
            if (b.TransactionIds != null)
            {
                foreach (string txnid in b.TransactionIds)
                {
                    strSummary = strSummary + txnid + "\r\n";
                }
            }
            strSummary = strSummary + "\r\n";
            return(strSummary);
        }
 public BatchDetailDataVal(BatchDetailData bdd)
 {
     BDD = bdd;
 }