Example #1
0
        internal DropDownWrapperModel MapDropDownwrapperEntityToModel(DropDrownWrapper Entity)
        {
            List <GDictionaryModel> District = new List <GDictionaryModel>();
            List <GDictionaryModel> mandal   = new List <GDictionaryModel>();

            GDictionaryModel     obj;
            DropDownWrapperModel Model = new DropDownWrapperModel();

            foreach (GDictionary ITEM in Entity.DistrctList)
            {
                obj       = new GDictionaryModel();
                obj.ID    = ITEM.ID;
                obj.Name  = ITEM.Name;
                obj.value = ITEM.value;
                obj.Type  = ITEM.Type;
                District.Add(obj);
            }
            Model.District = District;

            foreach (GDictionary ITEM in Entity.MandalList)
            {
                obj       = new GDictionaryModel();
                obj.ID    = ITEM.ID;
                obj.Name  = ITEM.Name;
                obj.value = ITEM.value;
                obj.Type  = ITEM.Type;
                mandal.Add(obj);
            }
            Model.Mandal = mandal;
            return(Model);
        }
        public DropDownWrapperModel GetDropDownValues()
        {
            DropDownWrapperModel    model    = new DropDownWrapperModel();
            DropDrownWrapper        Entity   = new DropDrownWrapper();
            List <GDictionaryModel> District = new List <GDictionaryModel>();
            List <GDictionaryModel> mandal   = new List <GDictionaryModel>();

            ServiceLayer.InformationService obj       = new InformationService();
            InformationObjectMapper         ObjMapper = new InformationObjectMapper();

            Entity = obj.GetDropDownValues();
            model  = ObjMapper.MapDropDownwrapperEntityToModel(Entity);
            return(model);
        }