public static bool CanUseClientCart( EmployeeInfo manager, ClientProfile client ) { if( manager == null ) throw new ArgumentNullException( "manager" ); if( client == null ) throw new ArgumentNullException( "client" ); return CanManageClient( manager, client ) && client.IsChecked && !client.IsRestricted; }
public static bool CanManageClient( EmployeeInfo manager, ClientProfile client ) { if( manager == null ) throw new ArgumentNullException( "manager" ); if( client == null ) throw new ArgumentNullException( "client" ); return manager.EmployeeId == client.ManagerId || manager.StoreId == client.RmsStoreId; }