public static void AcceptNewCustomer(Customer customer) { if (!WorkingHours()) { return; } CurrentCustomer = customer; CustomerQueue <Customer> .Dequeue(Customers); CurrentCustomer.StopWaitForServicesTimer(); Dss.AddCustomer(CurrentCustomer); //daily logging service Lucy.Say($"Greetings {CurrentCustomer.Name}! My name is {Lucy.Name} and I will be your Repair Shop Manager today."); Lucy.Say($"Please leave your {CurrentCustomer.MyCar.Name} at the parking lot."); if (Lucy._isGarageEmpty) { Lucy._isGarageEmpty = false; } Lucy._lrw.StoreLog($"New customer: {CurrentCustomer.Name}, Car: {CurrentCustomer.MyCar.Name}, Customer registered"); Lucy.Say($"{CurrentCustomer.Name}, what shall we do with your {CurrentCustomer.MyCar.Name}?"); if (WorkingHours()) { CurrentCustomer.MakeDiagnosticsOrder(); } Lucy._css.AppendContractText(); RepairAutomationTool.MakeRepairChoice(); }
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); }
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); }
static void Main() { MsgDecoratorTool.PrintCustomMessage("Welcome to the Repair Shop!", ConsoleColor.Green, ConsoleColor.Black); SetConsoleCtrlHandler(ConsoleCtrlCheck, true); WeeklyPaymentService wps = new WeeklyPaymentService(); MonthlyPaymentService mps = new MonthlyPaymentService(); RepairAutomationTool repairAutomationTool = new RepairAutomationTool(); }
public static void ResumeWorkingWithCustomer(Customer customer) { if (!WorkingHours()) { return; } CurrentCustomer = customer; CustomerQueue <Customer> .Dequeue(CustomersOnHold); CurrentCustomer.StopWaitForServicesTimer(); Lucy.Say($"Thank you for waiting. We are ready to complete your work orders, {CurrentCustomer.Name}!"); if (Lucy._isGarageEmpty) { Lucy._isGarageEmpty = false; } RepairAutomationTool.MakeRepairChoice(); }