示例#1
0
        public IEnumerable <SelectListItem> GetDropDownData(DropDownRequest request)
        {
            IEnumerable <SelectListItem> dropDownData = null;

            switch (request.Identifier)
            {
            case DropDownIdentifier.EXCHANGE:
            {
                dropDownData = MasterDataService.GetExchangeList(request);
                break;
            }

            case DropDownIdentifier.SYMBOL:
            {
                dropDownData = InMemoryObjects.ExchangeSymbolList.SingleOrDefault(x => x.Exchange == request.Exchange).Symbols.Select(x => new SelectListItem()
                    {
                        Text  = x.SymbolName.ToString(),
                        Value = ((int)x.Id).ToString()
                    }).ToList();

                break;
            }

            default:
            {
                dropDownData = null;
                break;
            }
            }

            return(dropDownData);
        }
示例#2
0
        public static IEnumerable <SelectListItem> GetExchangeList(DropDownRequest request)
        {
            IEnumerable <SelectListItem> exchangeList = null;

            exchangeList = Enum.GetValues(typeof(Exchange)).Cast <Exchange>().Select(x => new SelectListItem()
            {
                Text  = x.ToString(),
                Value = ((int)x).ToString()
            }).ToList();

            return(exchangeList);
        }
示例#3
0
        public IActionResult AddCompanyToDatabase([FromBody] DropDownRequest model)
        {
            var _Entity = new Integrator.Models.Domain.Companies.Company()
            {
                CompanyName = CommonHelper.CapitaliseAllWords(model.TEXT)
            };

            _companyService.AddCompany(_Entity);

            // return Json(new SelectList(cboOptions, "CoreSkillCategoryID", "CoreSkillCategoryName"));
            return(Json(_Entity));
        }
        public IActionResult GetSkillCategoryiesBySkillType([FromBody] DropDownRequest model)
        {
            var cboOptions = (from a in _coreKnowledgeBaseService.ListSkillCategoriesBySkillType(model.ID)
                              select new SelectListItem
            {
                Value = a.Id.ToString(),
                Text = a.CoreSkillCategoryName
            }).ToList();

            // return Json(new SelectList(cboOptions, "CoreSkillCategoryID", "CoreSkillCategoryName"));
            return(Json(cboOptions));
        }
        public IActionResult AddSkillCategory([FromBody] DropDownRequest model)
        {
            var _Entity = new CoreSkillCategory()
            {
                CoreKbSkillTypeID     = model.ID,
                CoreSkillCategoryName = model.TEXT
            };

            _coreKnowledgeBaseService.AddSkillCategory(_Entity);

            // return Json(new SelectList(cboOptions, "CoreSkillCategoryID", "CoreSkillCategoryName"));
            return(Json(_Entity));
        }
        public IActionResult GetSkillsByCategory([FromBody] DropDownRequest model)
        {
            var cboOptions = (from a in _coreKnowledgeBaseService.ListSkillsByCategory(model.ID)
                              select new
            {
                ID = a.Id,
                Options = "<div></div>",
                Skill = a.CoreSkill
            }).ToList();

            // return Json(new SelectList(cboOptions, "CoreSkillCategoryID", "CoreSkillCategoryName"));
            return(Json(cboOptions));
        }
示例#7
0
        public IActionResult AddSkill([FromBody] DropDownRequest model)
        {
            var _Entity = new CoreKbSkill()
            {
                CoreSkillCategoryID = model.ID,
                CoreSkill           = CommonHelper.CapitaliseAllWords(model.TEXT)
            };

            _coreKnowledgeBaseService.AddSkill(_Entity);

            // return Json(new SelectList(cboOptions, "CoreSkillCategoryID", "CoreSkillCategoryName"));
            return(Json(_Entity));
        }
示例#8
0
        public IActionResult GetSkillsByCategory([FromBody] DropDownRequest model)
        {
            var cboOptions = (from a in _coreKnowledgeBaseService.ListSkillsByCategory(model.ID)
                              orderby a.CoreSkill
                              select new
            {
                ID = a.Id,
                // Options = "<div></div>",

                Skill = CommonHelper.CapitaliseAllWords(a.CoreSkill),
                SkillCategoryID = a.CoreSkillCategoryID
            }).ToList();

            // return Json(new SelectList(cboOptions, "CoreSkillCategoryID", "CoreSkillCategoryName"));
            return(Json(cboOptions));
        }
        public IActionResult AddIndusrtyCategroy([FromBody] DropDownRequest model)
        {
            var entity = new CoreKbIndustryCategory()
            {
                CoreKbIndustryCategoryName = model.TEXT
            };

            try
            {
                _coreKnowledgeBaseService.AddIndusrtyCategory(entity);
            }
            catch (IntegratorException e)
            {
                throw e.InnerException;
            }


            return(Json(entity));
        }
示例#10
0
        public IActionResult AddIndusrty([FromBody] DropDownRequest model)
        {
            var entity = new CoreKbIndustry()
            {
                CoreKbIndustryName       = CommonHelper.CapitaliseAllWords(model.TEXT),
                CoreKbIndustryCategoryID = model.ID
            };

            try
            {
                _coreKnowledgeBaseService.AddIndustry(entity);
            }
            catch (IntegratorException e)
            {
                throw e.InnerException;
            }


            return(Json(entity));
        }
        public IActionResult GetIndustryByCategroy([FromBody] DropDownRequest model)
        {
            IEnumerable <object> cboOptions;

            try
            {
                cboOptions = (from a in _coreKnowledgeBaseService.ListIndustriesByCategory(model.ID)
                              select new
                {
                    ID = a.Id,
                    Options = "<div></div>",
                    Skill = a.CoreKbIndustryName
                }).ToList();
            }
            catch (IntegratorException e)
            {
                throw e.InnerException;
            }


            return(Json(cboOptions));
        }
示例#12
0
        public IActionResult GetIndustryByCategroy([FromBody] DropDownRequest model)
        {
            IEnumerable <object> cboOptions;

            try
            {
                cboOptions = (from a in _coreKnowledgeBaseService.ListIndustriesByCategory(model.ID)
                              orderby a.CoreKbIndustryName
                              select new
                {
                    ID = a.Id,
                    //Options = "<div></div>",
                    Industry = CommonHelper.CapitaliseAllWords(a.CoreKbIndustryName),
                    IndustryCategoryID = a.CoreKbIndustryCategoryID
                }).ToList();
            }
            catch (IntegratorException e)
            {
                throw e.InnerException;
            }


            return(Json(cboOptions));
        }
示例#13
0
        public IActionResult GetCurriculumVitaeWorkExperienceEntry([FromBody] DropDownRequest model)
        {
            var Rtn = _curriculumVitaeViewModelFactory.prepareEditSingleCurriuclumVitaeWorkExperiences(model.ID);

            return(Json(Rtn));
        }
示例#14
0
        public IActionResult RemoveCurriculumVitaeWorkExperienceEntry([FromBody] DropDownRequest model)
        {
            _userKnowledgeBaseService.RemoveUserJob(model.ID);

            return(Json("Success"));
        }
示例#15
0
 public IList <KeyValuePair <int, string> > CidadePorEstado(DropDownRequest equest)
 {
     return(_idropDownApplication.DadosCidade(equest.Uf));
 }
示例#16
0
 public IEnumerable <SelectListItem> GetDropDownData(DropDownRequest request)
 {
     throw new NotImplementedException();
 }