/// <summary> /// 获取用户具有权限的所有中心 /// </summary> /// <param name="userid"></param> /// <returns></returns> public BusinessObjectCollection GetAuthorizedCenters(int userid) { BusinessObjectCollection boc = new BusinessObjectCollection("Dictionary"); boc.SessionInstance = new Wicresoft.Session.Session(); boc.AddFilter(GetAuthorizedCenterFilter(userid)); boc.Query(); return(boc); }
public bool IsFieldExclusiveM(string fieldName, string fieldValue, string ObjectName, bool stringField, int objectPKID) { BusinessFilter filter = new BusinessFilter(ObjectName); filter.AddFilterItem("PKID", objectPKID.ToString(), Operation.NotEqual, FilterType.NumberType, AndOr.AND); filter.AddFilterItem(fieldName, fieldValue, Operation.Equal, stringField ? FilterType.StringType : FilterType.NumberType, AndOr.AND); BusinessObjectCollection boc = new BusinessObjectCollection(ObjectName); boc.SessionInstance = new Wicresoft.Session.Session(); boc.AddFilter(filter); boc.Query(); return((boc.Count > 0) ? false : true); }
public bool IsRegionExclusive(string fieldName, string fieldValue, bool stringField, int FK_Dictionary) { BusinessFilter filter = new BusinessFilter("Dictionary_RegionDetail"); filter.AddFilterItem("FK_Dictionary", FK_Dictionary.ToString(), Operation.NotEqual, FilterType.NumberType, AndOr.AND); filter.AddFilterItem(fieldName, fieldValue, Operation.Equal, stringField ? FilterType.StringType : FilterType.NumberType, AndOr.AND); filter.AddFilterItem("IsValid", "1", Operation.Equal, FilterType.NumberType, AndOr.AND); BusinessObjectCollection boc = new BusinessObjectCollection("Dictionary_RegionDetail"); boc.SessionInstance = new Wicresoft.Session.Session(); boc.AddFilter(filter); boc.Query(); return((boc.Count > 0) ? false : true); }