Ejemplo n.º 1
0
        private List <DropDownListViewModel> GetLookUpDropDownList(string lookupTypeName, int?lookupCodeId)
        {
            var _list = new List <DropDownListViewModel>();

            RecruitmentService recruitmentService = new RecruitmentService();

            List <LookupCodeMaster> lookUpCategories = new List <LookupCodeMaster>();

            if (lookupTypeName != null)
            {
                lookUpCategories = recruitmentService.GetLookUpDropDownList(lookupTypeName);
            }
            else if (lookupCodeId != null)
            {
                lookUpCategories = recruitmentService.GetLookUpDropDownList(lookupCodeId ?? 0);
            }


            foreach (LookupCodeMaster cat in lookUpCategories)
            {
                DropDownListViewModel ddl = new DropDownListViewModel();

                ddl.Id   = cat.LookupCodeId;
                ddl.Name = cat.LookupCodeName;
                _list.Add(ddl);
            }


            return(_list);
        }