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 bool CheckAccount(ResultObject res, DemandAccount demand) { int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); if (accountCheck < 0) { res.ErrorCodes.Add(BusinessErrorCodes.ToText(accountCheck)); return(false); } return(true); }