Exemple #1
0
        public bool InArea(PhoneAreaInfo phoneAreaInfo, string mobile)
        {
            if (Filters == null || Filters.Count <= 0)
            {
                return(false);
            }

            List <SPClientChannelSettingFiltersWrapper> filters =
                SPClientChannelSettingFiltersWrapper.FindAllByClientChannelSettingID(this);

            SPClientChannelSettingFiltersWrapper customerPhoneArea =
                filters.Find(p => (p.ParamsName.Trim().ToLower() == "province" && p.FilterValue.StartsWith("自定义")));

            if (customerPhoneArea != null)
            {
                if (customerPhoneArea.HasPhone(mobile))
                {
                    return(true);
                }
            }

            SPClientChannelSettingFiltersWrapper otherPhoneArea = filters.Find(p => (p.ParamsName.Trim().ToLower() == "province" && p.FilterValue.Equals("其他")));

            if (otherPhoneArea != null)
            {
                return(true);
            }

            return(filters.Exists(p => p.ParamsName.Trim().ToLower() == "province" && p.FilterValue == phoneAreaInfo.Province));
        }
Exemple #2
0
        public bool InArea(PhoneAreaInfo phoneAreaInfo)
        {
            if (Filters == null || Filters.Count <= 0)
            {
                return(false);
            }

            List <SPClientChannelSettingFiltersWrapper> filters =
                SPClientChannelSettingFiltersWrapper.FindAllByClientChannelSettingID(this);

            return(filters.Exists(p => p.ParamsName.Trim().ToLower() == "province" && p.FilterValue == phoneAreaInfo.Province));
        }
Exemple #3
0
 public static void Delete(SPClientChannelSettingFiltersWrapper instance)
 {
     businessProxy.Delete(instance.entity);
 }
Exemple #4
0
 public static void Refresh(SPClientChannelSettingFiltersWrapper instance)
 {
     businessProxy.Refresh(instance.entity);
 }
Exemple #5
0
 public static void SaveOrUpdate(SPClientChannelSettingFiltersWrapper obj)
 {
     businessProxy.SaveOrUpdate(obj.entity);
 }