Example #1
0
        private List <ModelCode> NadjiTipove(ModelCode kodProp)
        {
            ModelResourcesDesc modResDes = new ModelResourcesDesc();

            //List<DMSType> tip = new List<DMSType>();

            string[] props = (kodProp.ToString()).Split('_');
            props[1] = props[1].TrimEnd('S');

            DMSType propertyCode = ModelResourcesDesc.GetTypeFromModelCode(kodProp);


            ModelCode mc;

            ModelCodeHelper.GetModelCodeFromString(propertyCode.ToString(), out mc);

            foreach (ModelCode modelCode in Enum.GetValues(typeof(ModelCode)))
            {
                if (String.Compare(props[1], modelCode.ToString()) == 0)
                {
                    DMSType type = ModelCodeHelper.GetTypeFromModelCode(modelCode);
                    if (type == 0)
                    {
                        tipovi = new List <ModelCode>();
                        List <DMSType> r = modResDes.GetLeaves(modelCode);
                        foreach (DMSType ff in r)
                        {
                            tipovi.Add(modResDes.GetModelCodeFromType(ff));
                        }
                    }
                    else
                    {
                        tipovi = new List <ModelCode>();
                        tipovi.Add(modelCode);
                    }
                }
            }


            return(new List <ModelCode>());
        }