Beispiel #1
0
        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");
        }
Beispiel #2
0
 public void AddNew(DbInteract dbInteract)
 {
     dbInteract.AddNew(NewInvoices, @", 'Y', 'N', 'N'");
 }
Beispiel #3
0
 public void ChangeStatus(DbInteract dbInteract)
 {
     dbInteract.ChangeValue(Matched, "invoice");
     dbInteract.ChangeValue(Matched, "filed");
 }
Beispiel #4
0
 public void MatchCheck(DbInteract dbInteract)
 {
     dbInteract.InputSorter(2, 1, NewInvoices, Matched, Filed);
 }
Beispiel #5
0
 public void MatchCheck(DbInteract dbInteract)
 {
     dbInteract.InputSorter(1, 2, NewPOs, Matched, Filed);
 }