Esempio n. 1
0
 private static void MoveCustomer()
 {
     Console.WriteLine("***Simple Transaction***\n");
     Dal.ProcessCreditRisk(true, 1);
     Dal.ProcessCreditRisk(false, 4);
     Console.WriteLine("Check CreditRisk table for results");
     Console.WriteLine("*********************");
 }
Esempio n. 2
0
        public static void MoveCustomer()
        {
            Console.WriteLine("Simple Transaction Example..");
            bool throwEx = true;

            Console.Write("Do you want to throw an exception?(Y or N): ");
            var userAnswer = Console.ReadLine();

            if (userAnswer?.ToLower() == "n")
            {
                throwEx = false;
            }

            var dal = new InventoryDal();

            dal.ProcessCreditRisk(throwEx, 1);
        }
Esempio n. 3
0
        public static void MoveCustomer()
        {
            Console.WriteLine("****** Simple Transaction Example *********");
            bool throwEx = true;

            Console.Write("Do you want to throw Exception (y or n): ?");
            var userAnswer = Console.ReadLine();

            if (userAnswer?.ToLower() == "n")
            {
                throwEx = false;
            }

            var dal = new InventoryDal();

            dal.ProcessCreditRisk(throwEx, 1);
            Console.WriteLine("Check CreditRisk table for result");
            Console.ReadLine();
        }
Esempio n. 4
0
        private static void Main(string[] args)
        {
            Console.WriteLine("**** Simple Transaction Example *****\n");

            var throwEx = true;

            Console.Write("Do you want to throw an exception (Y or N): ");
            var userAnswer = Console.ReadLine();

            if (userAnswer?.ToLower() == "n")
            {
                throwEx = false;
            }

            var inventory = new InventoryDal();

            inventory.OpenConnection(@"Data Source=SEGOTW10393726;Initial Catalog=AutoLot;Integrated Security=SSPI");
            inventory.ProcessCreditRisk(throwEx, 7);
            Console.WriteLine("Check CreditRisk table for results");
            Console.ReadLine();
        }
Esempio n. 5
0
        static void Main(string[] args)
        {
            Console.WriteLine("***** Simple Transaction Example *****\n");

            bool   throwEx    = true;
            string userAnswer = string.Empty;

            Console.Write("Do you want to throw an exception (Y or N): ");
            userAnswer = Console.ReadLine();
            if (userAnswer != null && userAnswer.ToLower() == "n")
            {
                throwEx = false;
            }

            InventoryDal dal = new InventoryDal();

            dal.OpenConnection(@"Data Source=Hi-Tech-PC;Initial Catalog=AutoLot;Integrated Security=True;Pooling=False");

            dal.ProcessCreditRisk(333, throwEx);
            Console.WriteLine("Check CreditRisk table for results");
            Console.ReadLine();
        }