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("*********************"); }
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); }
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(); }
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(); }
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(); }