Exemple #1
0
        private void GoToCourt()
        {
            CourtClient     client   = new CourtClient("BasicHttpBinding_ICourt");
            ServiceContract contract = new ServiceContract();

            contract.CustomerName      = GetName();
            contract.TotalPartCost     = MyAgreement.TotalPartCost;
            contract.TotalServicesCost = MyAgreement.TotalServicesCost;
            contract.Total             = MyAgreement.GetTotal();
            var decision = client.MakeDecision(contract);

            client.Close();

            if (decision == -1)
            {
                GoToRepairShop(true);
            }
            if (decision == 0)
            {
                ShopManager.PayWarrantyCompensation(MyAgreement.TotalServicesCost - (MyDiscounts.GetDiscountRate() * MyAgreement.TotalServicesCost / 100));
            }
            if (decision == 1)
            {
                ShopManager.AcceptPayment(1000);
            }
            RepairAutomationTool.RemoveDisappointedCustomer(this);
        }
Exemple #2
0
 public void OnScandalEvent(Object source, EventArgs e)
 {
     Say($"{Name}: THIS IS NOT GOING ANYWHERE!!!! I have been waiting for 3 days already!");
     Say($"{Name} slams the door and leaves the Auto Repair Shop");
     ShopManager.HandleProblematicCustomer(this);
     RepairAutomationTool.RemoveDisappointedCustomer(this);
 }