public void TestGetCreditCardByOP()
        {
            var repo = new ARResearchService();
            var cc   = repo.GetCreditCardByOP(4216430).Result;

            Assert.IsNotNull(cc);
            Assert.IsNotNull(cc.CrCardNoDecrypted);
        }
Beispiel #2
0
        private async void CreditCardButton_Click(object sender, EventArgs e)
        {
            ClearError();

            ResultsDataGridView.DataSource = null;
            ResultsDataGridView.Rows.Clear();
            ResultsDataGridView.Columns.Clear();

            CreditCardButton.Enabled = false;

            bool success = Int32.TryParse(OPTextBox.Text.TrimEnd(), out int result);
            if (success)
            {
                var creditcard = await service.GetCreditCardByOP(result);

                if (creditcard != null)
                {
                    ResultsDataGridView.Columns.Add("CrCardTypeName", "Card Type");
                    ResultsDataGridView.Columns.Add("CrCardNo", "Card No");
                    ResultsDataGridView.Columns.Add("CrCardExp", "Expire Date");
                    ResultsDataGridView.Columns.Add("CardHolderName", "Card Holder");
                    ResultsDataGridView.Columns.Add("CrCardStreetNbrZip", "Street");
                    ResultsDataGridView.Columns.Add("CrCardZipCode", "Zip");

                    var index = ResultsDataGridView.Rows.Add();
                    var row = ResultsDataGridView.Rows[index];

                    row.Cells["CrCardTypeName"].Value = creditcard.CrCardTypeName;
                    row.Cells["CrCardNo"].Value = creditcard.CrCardNo;
                    row.Cells["CrCardExp"].Value = creditcard.CrCardExp;
                    row.Cells["CardHolderName"].Value = creditcard.CardHolderName;
                    row.Cells["CrCardStreetNbrZip"].Value = creditcard.CrCardStreetNbrZip;
                    row.Cells["CrCardZipCode"].Value = creditcard.CrCardZipCode;

                    CountLabel.Text = "1";
                }

                CountLabel.Text = "0";
            }
            else
            {
                OPTextBox.Text += " Error can't convert to number";
                OPTextBox.Select(0, OPTextBox.TextLength);

                CountLabel.Text = "0";
            }


            CreditCardButton.Enabled = true;
        }
Beispiel #3
0
        private void ResearchControl_Load(object sender, EventArgs e)
        {
            service = new ARResearchService();
            var preloadEF = service.GetCreditCardByOP(0);

            foreach (Control control in Controls)
            {
                control.KeyUp += KeyUpEventHandler;

                if (control.Controls.Count > 0)
                {
                    foreach (Control childControl in control.Controls)
                    {
                        childControl.KeyUp += KeyUpEventHandler;
                    }
                }
            }
        }