public GDictionaryModel MobileNumberVerification(Int64 MobileNumber) { GDictionaryModel Model = new GDictionaryModel(); GDictionary entity = new GDictionary(); ServiceLayer.InformationService obj = new InformationService(); entity = obj.MobileNumberVerification(MobileNumber); InformationObjectMapper ObjMapper = new InformationObjectMapper(); Model = ObjMapper.MapGDictionaryEntityToModel(entity); return(Model); }
internal GDictionaryModel MapGDictionaryEntityToModel(GDictionary Entity) { GDictionaryModel obj = new GDictionaryModel(); if (Entity != null) { obj.ID = Entity.ID; obj.Name = Entity.Name; obj.value = Entity.value; obj.Type = Entity.Type; } return(obj); }
/// <summary> /// 取得項目列舉 /// </summary> /// <typeparam name="T"></typeparam> /// <returns></returns> private GDictionary <T> GetKeeper <T>() { var key = typeof(T).ToString(); if (this.ItemStorage.ContainsKey(key)) { var value = this.ItemStorage[key]; if (value is GDictionary <T> ) { return((GDictionary <T>) this.ItemStorage[key]); } else { this.ItemStorage.Remove(key); } } var keeper = new GDictionary <T>(); this.ItemStorage.Add(key, keeper); return(keeper); }
/// <summary> /// 取得群組過濾條件集合。 /// </summary> /// <param name="filterItems">過濾條件項目集合。</param> private GDictionary <GFilterItemCollection> GetGroupFilterItems(GFilterItemCollection filterItems) { GDictionary <GFilterItemCollection> oList; GFilterItemCollection oFilterItems; string sGroupNumber; oList = new GDictionary <GFilterItemCollection>(); foreach (GFilterItem filterItem in filterItems) { sGroupNumber = BaseFunc.CStr(filterItem.GroupNumber); if (!oList.ContainsKey(sGroupNumber)) { oFilterItems = new GFilterItemCollection(); oFilterItems.Add(filterItem); oList.Add(sGroupNumber, oFilterItems); } else { oList[sGroupNumber].Add(filterItem); } } return(oList); }