Ejemplo n.º 1
0
        public async Task<IList<MentorDropDownModel>> MakeBizMentor(int mngCompSn, string excutorId, int bizWorkSn, int bizWorkYear)
        {
            //기업 DropDwon List Data
            var listScUsr = await _scMentorMappingService.GetMentorListByBizMng(mngCompSn, excutorId, bizWorkSn, bizWorkYear);

            var mentorDropDown =
                Mapper.Map<List<MentorDropDownModel>>(listScUsr);

            //기업 드롭다운 타이틀 추가
            MentorDropDownModel titlementor = new MentorDropDownModel
            {
                LoginId = "",
                Name = "멘토 선택"
            };

            mentorDropDown.Insert(0, titlementor);

            return mentorDropDown;
        }
        public async Task<ActionResult> ModifyCompany(string bizWorkSn, string compSn)
        {
            ViewBag.LeftMenu = Global.ComMng;

            var scCompMapping = await _scCompMappingService.GetCompMappingAsync(int.Parse(bizWorkSn), int.Parse(compSn));
            var usrView =
                Mapper.Map<CompanyMngViewModel>(scCompMapping);

            //업종, 종목
            var listScBizType = await _scBizTypeService.GetScBizTypeByCompSn(int.Parse(compSn));
            var bizTypeViewModel =
               Mapper.Map<List<BizTypeViewModel>>(listScBizType);

            usrView.BizTypes = bizTypeViewModel;

            //해당 사업의 멘토 리스트 조회
            var scMentorMappings = await _scMentorMappingService.GetMentorListAsync(int.Parse(Session[Global.CompSN].ToString()), int.Parse(bizWorkSn));

            var mentorDropDown =
                Mapper.Map<List<MentorDropDownModel>>(scMentorMappings);

            MentorDropDownModel title = new MentorDropDownModel();
            title.LoginId = "";
            title.Name = "멘토 선택";
            mentorDropDown.Insert(0, title);

            SelectList mentorList = new SelectList(mentorDropDown, "LoginId", "Name");

            ViewBag.SelectMentorList = mentorList;

            return View(usrView);

        }