public static bool CheckPackage(ResultObject res, int packageId, DemandPackage demand) { int packageCheck = SecurityContext.CheckPackage(packageId, DemandPackage.IsActive); if (packageCheck < 0) { res.ErrorCodes.Add(BusinessErrorCodes.ToText(packageCheck)); return(false); } return(true); }
public static int CheckPackage(int packageId, DemandPackage demand) { // load package PackageInfo package = PackageController.GetPackage(packageId); if (package == null) { return(BusinessErrorCodes.ERROR_PACKAGE_NOT_FOUND); } return(CheckPackage(package, demand)); }
public static int CheckPackage(PackageInfo package, DemandPackage demand) { if ((demand & DemandPackage.IsActive) == DemandPackage.IsActive) { // should make a check if the package is active if (package.StatusId == (int)PackageStatus.Cancelled) { return(BusinessErrorCodes.ERROR_PACKAGE_CANCELLED); } else if (package.StatusId == (int)PackageStatus.Suspended) { return(BusinessErrorCodes.ERROR_PACKAGE_SUSPENDED); } } return(0); }
public static int CheckPackage(PackageInfo package, DemandPackage demand) { if ((demand & DemandPackage.IsActive) == DemandPackage.IsActive) { // should make a check if the package is active if (package.StatusId == (int)PackageStatus.Cancelled) return BusinessErrorCodes.ERROR_PACKAGE_CANCELLED; else if (package.StatusId == (int)PackageStatus.Suspended) return BusinessErrorCodes.ERROR_PACKAGE_SUSPENDED; } return 0; }
public static int CheckPackage(int packageId, DemandPackage demand) { // load package PackageInfo package = PackageController.GetPackage(packageId); if (package == null) return BusinessErrorCodes.ERROR_PACKAGE_NOT_FOUND; return CheckPackage(package, demand); }
public static bool CheckPackage(ResultObject res, int packageId, DemandPackage demand) { int packageCheck = SecurityContext.CheckPackage(packageId, DemandPackage.IsActive); if (packageCheck < 0) { res.ErrorCodes.Add(BusinessErrorCodes.ToText(packageCheck)); return false; } return true; }