public void PO() { Console.Clear(); var SqlConn = new MyDbConnect("server=localhost;user=*****;database=invoice_match;port=3306;password=*****"); var dbInteract = new DbInteract(SqlConn); var purchaseOrders = new PurchaseOrders(); Console.WriteLine("Enter PO numbers, when the last has been entered press enter again."); purchaseOrders.EnterPOs(); purchaseOrders.MatchCheck(dbInteract); Console.WriteLine("The following POs are already filed:"); Operations.DisplayEffected(purchaseOrders.ShowFiled()); Console.WriteLine("\nPress Enter to continue."); Console.ReadLine(); Console.WriteLine("The following orders are ready to file:"); Operations.DisplayEffected(purchaseOrders.ShowMatched()); Console.WriteLine("\n\nPress enter to change status to filed."); Console.ReadLine(); purchaseOrders.ChangeStatus(dbInteract); Console.WriteLine("\n\nThe following orders need a database entry:"); Operations.DisplayEffected(purchaseOrders.ShowNew()); Console.WriteLine("\n\nPress enter to create entries."); Console.ReadLine(); purchaseOrders.AddNew(dbInteract); Console.WriteLine("\nProcess Finished...\n"); }
public DbInteract(MyDbConnect sqlConn) { SqlConn = sqlConn; }