public FraudRequest LoadPreviouisTransactions(SqlCommand sqlCommad)
        {
            SqlDataReader reader = null;

            try
            {
                reader = sqlCommad.ExecuteReader();
                FraudRequest objCustomer = new FraudRequest();

                if (reader.Read())
                {
                    if (!reader.IsDBNull(1))
                    {
                        objCustomer.IPAdress = reader.GetString(1) ?? "";
                    }
                    if (!reader.IsDBNull(2))
                    {
                        objCustomer.TransactionAmount = Convert.ToInt64(reader.GetString(2));
                    }

                    if (!reader.IsDBNull(3))
                    {
                        objCustomer.TransactionResult = GetTransactionResult(reader.GetString(3));
                    }
                    if (!reader.IsDBNull(4))
                    {
                        objCustomer.CustomerID = Convert.ToInt32(reader.GetString(4));
                    }
                    if (!reader.IsDBNull(5))
                    {
                        objCustomer.CardNumber = reader.GetInt64(5);
                    }

                    if (!reader.IsDBNull(6))
                    {
                        objCustomer.City = reader.GetString(6) ?? "";
                    }
                    if (!reader.IsDBNull(7))
                    {
                        objCustomer.Country = reader.GetString(7) ?? "";
                    }
                    if (!reader.IsDBNull(8))
                    {
                        objCustomer.CardNumber = Convert.ToInt64(reader.GetString(8));
                    }
                }
                reader.Close();
                return(objCustomer);
            }
            finally
            {
                reader.Close();
            }
        }
        public bool SaveTransaction(FraudRequest transactionMade)
        {
            int rowsChanged = 0;

            string[] transaction = { transactionMade.IPAdress,              transactionMade.TransactionAmount.ToString(), transactionMade.TransactionResult.ToString(),
                                     transactionMade.CustomerID.ToString(), transactionMade.CardNumber.ToString(),        transactionMade.City,                        transactionMade.Country,
                                     transactionMade.EmailID };

            SqlCommand cmd = sqlConnection.CreateCommand();

            cmd.CommandText = String.Format(CultureInfo.InvariantCulture,
                                            "Insert into dbo.Transactions" +
                                            "(IPAdress,TransactionAmount,Result,CustomerNo,CardNumber,City,Country,Email)" +
                                            "values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}')", transaction);
            rowsChanged = cmd.ExecuteNonQuery();
            if (rowsChanged > 0)
            {
                return(true);
            }
            return(false);
        }