public bool ReportPackage(string PackageCode, PackageReportCode reportCode) { int packageIndex = Array.FindIndex(currentTour.ssccs, it => it.code == PackageCode); if (packageIndex != -1) { currentTour.ssccs[packageIndex].SSCCStatus = (int)reportCode; data.UpdateTour(currentTour); return(true); } else { Debug.Log("Package not found in current tour: " + PackageCode); return(false); } }
public bool ReportCurrentPackage(PackageReportCode reportCode) { currentPackage.SSCCStatus = (int)reportCode; return(ReportPackage(currentPackage.code, reportCode)); }