public string GetFormattedInfo() { string resultString = ""; switch (selectedType) { case string booking when booking == ModelType.booking: foreach (Booking item in BookingNetworkProxy.GetAll()) { resultString += $"{Consts.lineBraker}\n"; resultString += $"{item.GetDescription()}\n"; resultString += $"{Consts.lineBraker}\n"; } break; case string client when client == ModelType.client: foreach (Client item in ClientNetworkProxy.GetAll()) { resultString += $"{Consts.lineBraker}\n"; resultString += $"{item.GetDescription()}\n"; resultString += $"{Consts.lineBraker}\n"; } break; case string cutter when cutter == ModelType.cutter: foreach (Cutter item in CutterNetworkProxy.GetAll()) { resultString += $"{Consts.lineBraker}\n"; resultString += $"{item.GetDescription()}\n"; resultString += $"{Consts.lineBraker}\n"; } break; case string model when model == ModelType.model: foreach (Model item in ModelNetworkProxy.GetAll()) { resultString += $"{Consts.lineBraker}\n"; resultString += $"{item.GetDescription()}\n"; resultString += $"{Consts.lineBraker}\n"; } break; case string fabric when fabric == ModelType.fabric: foreach (Fabric item in FabricNetworkProxy.GetAll()) { resultString += $"{Consts.lineBraker}\n"; resultString += $"{item.GetDescription()}\n"; resultString += $"{Consts.lineBraker}\n"; } break; case string manufacturer when manufacturer == ModelType.manufacturer: foreach (Manufacturer item in ManufacturerNetworkProxy.GetAll()) { resultString += $"{Consts.lineBraker}\n"; resultString += $"{item.GetDescription()}\n"; resultString += $"{Consts.lineBraker}\n"; } break; case string fitting when fitting == ModelType.fitting: foreach (Fitting item in FittingNetworkProxy.GetAll()) { resultString += $"{Consts.lineBraker}\n"; resultString += $"{item.GetDescription()}\n"; resultString += $"{Consts.lineBraker}\n"; } break; } return(resultString); }
public void load() { allBookings = BookingNetworkProxy.GetAll(); allFittings = FittingNetworkProxy.GetAll(); RemoveBookingDuplicates(); }