public override string ToString() { StringBuilder sb = new StringBuilder("TScan("); sb.Append("StartRow: "); sb.Append(StartRow); sb.Append(",StopRow: "); sb.Append(StopRow); sb.Append(",Columns: "); sb.Append(Columns); sb.Append(",Caching: "); sb.Append(Caching); sb.Append(",MaxVersions: "); sb.Append(MaxVersions); sb.Append(",TimeRange: "); sb.Append(TimeRange == null ? "<null>" : TimeRange.ToString()); sb.Append(",FilterString: "); sb.Append(FilterString); sb.Append(",BatchSize: "); sb.Append(BatchSize); sb.Append(",Attributes: "); sb.Append(Attributes); sb.Append(",Authorizations: "); sb.Append(Authorizations == null ? "<null>" : Authorizations.ToString()); sb.Append(",Reversed: "); sb.Append(Reversed); sb.Append(")"); return(sb.ToString()); }
public static bool HaveAuthorization(Bm2s.Poco.Common.User.User user, Authorizations authorization, Bm2sBO.Utils.Modules module) { return user != null && (user.IsAdministrator || ModuleUtils.ModulesAuthorization(user.Id).Any(item => item.Code.ToLower() == (authorization.ToString() + "_" + module.ToString()).ToLower() && (!item.EndingDate.HasValue || item.EndingDate.Value < DateTime.Now.Date))); }
public override string ToString() { var sb = new StringBuilder("TScan("); bool __first = true; if (StartRow != null && __isset.startRow) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("StartRow: "); sb.Append(StartRow); } if (StopRow != null && __isset.stopRow) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("StopRow: "); sb.Append(StopRow); } if (Columns != null && __isset.columns) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Columns: "); sb.Append(Columns); } if (__isset.caching) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Caching: "); sb.Append(Caching); } if (__isset.maxVersions) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("MaxVersions: "); sb.Append(MaxVersions); } if (TimeRange != null && __isset.timeRange) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("TimeRange: "); sb.Append(TimeRange == null ? "<null>" : TimeRange.ToString()); } if (FilterString != null && __isset.filterString) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("FilterString: "); sb.Append(FilterString); } if (__isset.batchSize) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("BatchSize: "); sb.Append(BatchSize); } if (Attributes != null && __isset.attributes) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Attributes: "); sb.Append(Attributes); } if (Authorizations != null && __isset.authorizations) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Authorizations: "); sb.Append(Authorizations == null ? "<null>" : Authorizations.ToString()); } if (__isset.reversed) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Reversed: "); sb.Append(Reversed); } sb.Append(")"); return(sb.ToString()); }