//[HttpPost]
        //public async Task<ActionResult> MentorList(string BizWorkList, string MentorPartList, string curPage)
        //{
        //    ViewBag.LeftMenu = Global.MentorMng;

        //    string excutorId = null;

        //    //사업담당자 일 경우 담당 사업만 조회
        //    if (Session[Global.UserDetailType].ToString() == "M")
        //    {
        //        excutorId = Session[Global.LoginID].ToString();
        //    }
        //    //사업 DropDown List Data
        //    var listScBizWork = await _scBizWorkService.GetBizWorkList(int.Parse(Session[Global.CompSN].ToString()), excutorId);


        //    var bizWorkDropDown =
        //        Mapper.Map<List<BizWorkDropDownModel>>(listScBizWork);

        //    //사업담당자 일 경우 담당 사업만 조회
        //    if (Session[Global.UserDetailType].ToString() == "M")
        //    {
        //        BizWorkList = listScBizWork.First().BizWorkSn.ToString();
        //    }
        //    else
        //    {
        //        BizWorkDropDownModel title = new BizWorkDropDownModel();
        //        title.BizWorkSn = 0;
        //        title.BizWorkNm = "사업명 선택";
        //        bizWorkDropDown.Insert(0, title);
        //    }

        //    SelectList bizList = new SelectList(bizWorkDropDown, "BizWorkSn", "BizWorkNm");

        //    ViewBag.SelectBizWorkList = bizList;


        //    //멘토 분야 DropDown List Data
        //    var mentorPart = new List<SelectListItem>(){
        //        new SelectListItem { Value = "", Text = "멘토분야", Selected = true },
        //        new SelectListItem { Value = "F", Text = "자금" },
        //        new SelectListItem { Value = "D", Text = "기술개발" },
        //        new SelectListItem { Value = "T", Text = "세무회계" },
        //        new SelectListItem { Value = "L", Text = "법무" },
        //        new SelectListItem { Value = "W", Text = "노무" },
        //        new SelectListItem { Value = "P", Text = "특허" },
        //        new SelectListItem { Value = "M", Text = "마케팅" },
        //        new SelectListItem { Value = "E", Text = "기타" }
        //    };

        //    SelectList mentorPartList = new SelectList(mentorPart, "Value", "Text");

        //    ViewBag.SelectMentorPartList = mentorPartList;

        //    //전문가 리스트 조회
        //    var listMentor = await _scMentorMappingService.GetMentorListAsync(int.Parse(Session[Global.CompSN].ToString()), int.Parse(BizWorkList), MentorPartList);

        //    var usrViews =
        //        Mapper.Map<List<JoinMentorViewModel>>(listMentor);

        //    int pagingSize = int.Parse(ConfigurationManager.AppSettings["PagingSize"]);
        //    return View(new StaticPagedList<JoinMentorViewModel>(usrViews.ToPagedList(int.Parse(curPage), pagingSize), int.Parse(curPage), pagingSize, usrViews.Count));

        //}

        //public async Task<ActionResult> RegMentor()
        //{
        //    ViewBag.LeftMenu = Global.MentorMng;

        //    string excutorId = null;

        //    //사업담당자 일 경우 담당 사업만 조회
        //    if (Session[Global.UserDetailType].ToString() == "M")
        //    {
        //        excutorId = Session[Global.LoginID].ToString();
        //    }

        //    //사업 DropDown List Data
        //    var listScBizWork = await _scBizWorkService.GetBizWorkList(int.Parse(Session[Global.CompSN].ToString()), excutorId);


        //    var bizWorkDropDown =
        //        Mapper.Map<List<BizWorkDropDownModel>>(listScBizWork);

        //    if (Session[Global.UserDetailType].ToString() == "A")
        //    {
        //        BizWorkDropDownModel title = new BizWorkDropDownModel();
        //        title.BizWorkSn = 0;
        //        title.BizWorkNm = "사업명 선택";
        //        bizWorkDropDown.Insert(0, title);
        //    }

        //    SelectList bizList = new SelectList(bizWorkDropDown, "BizWorkSn", "BizWorkNm");

        //    ViewBag.SelectBizWorkList = bizList;
        //    return View();
        //}

        //[HttpPost]
        //public async Task<ActionResult> RegMentor(JoinMentorViewModel joinMentorViewModel)
        //{
        //    ViewBag.LeftMenu = Global.MentorMng;

        //    string excutorId = null;

        //    //사업담당자 일 경우 담당 사업만 조회
        //    if (Session[Global.UserDetailType].ToString() == "M")
        //    {
        //        excutorId = Session[Global.LoginID].ToString();
        //    }
        //    //사업 DropDown List Data
        //    var listScBizWork = await _scBizWorkService.GetBizWorkList(int.Parse(Session[Global.CompSN].ToString()), excutorId);


        //    var bizWorkDropDown =
        //        Mapper.Map<List<BizWorkDropDownModel>>(listScBizWork);

        //    if (Session[Global.UserDetailType].ToString() == "A")
        //    {
        //        BizWorkDropDownModel title = new BizWorkDropDownModel();
        //        title.BizWorkSn = 0;
        //        title.BizWorkNm = "사업명 선택";
        //        bizWorkDropDown.Insert(0, title);
        //    }

        //    SelectList bizList = new SelectList(bizWorkDropDown, "BizWorkSn", "BizWorkNm");

        //    ViewBag.SelectBizWorkList = bizList;


        //    if (ModelState.IsValid == false)
        //    {
        //        if (joinMentorViewModel.BizWorkSn == 0)
        //        {
        //            ModelState.AddModelError("", "사업명을 선택하지 않았습니다.");
        //            return View(joinMentorViewModel);
        //        }

        //        var scUsr = Mapper.Map<VcUsrInfo>(joinMentorViewModel);
        //        var scCompInfo = Mapper.Map<VcCompInfo>(joinMentorViewModel);

        //        //회원정보 추가 정보 설정
        //        scUsr.RegId = Session[Global.LoginID].ToString();
        //        scUsr.RegDt = DateTime.Now;
        //        scUsr.Status = "N";
        //        scUsr.UsrType = "M";
        //        scUsr.UsrTypeDetail = "E";
        //        scUsr.UseErp = "0";

        //        SHACryptography sha2 = new SHACryptography();
        //        scUsr.LoginPw = sha2.EncryptString(scUsr.LoginPw);

        //        //회사정보 추가 정보 설정
        //        scCompInfo.Status = "N";
        //        scCompInfo.RegId = Session[Global.LoginID].ToString();
        //        scCompInfo.RegDt = DateTime.Now;

        //        //멘토 매핑정보 생성
        //        VcMentorMapping scMentorMappiing = new VcMentorMapping();
        //        scMentorMappiing.BizWorkSn = joinMentorViewModel.BizWorkSn;
        //        scMentorMappiing.MentorId = scUsr.LoginId;
        //        scMentorMappiing.Status = "N";
        //        scMentorMappiing.MngCompSn = int.Parse(Session[Global.CompSN].ToString());
        //        scMentorMappiing.RegId = scUsr.RegId;
        //        scMentorMappiing.RegDt = scUsr.RegDt;
        //        scUsr.ScMentorMappiings.Add(scMentorMappiing);

        //        //저장
        //        scCompInfo.ScUsrs.Add(scUsr);


        //        //bool result = _scUsrService.AddCompanyUser(scCompInfo, scUsr, syUser);
        //        int result = await _scMentorMappingService.AddMentorAsync(scCompInfo);

        //        if (result != -1)
        //            return RedirectToAction("MentorList", "MentorMng");
        //        else
        //        {
        //            ModelState.AddModelError("", "멘토 등록 실패.");
        //            return View(joinMentorViewModel);
        //        }
        //    }
        //    return View(joinMentorViewModel);
        //}

        //public async Task<ActionResult> MentorDetail(string bizWorkSn, string mentorId)
        //{
        //    ViewBag.LeftMenu = Global.MentorMng;

        //    VcMentorMapping vcMentorMapping = await _scMentorMappingService.GetMentor(int.Parse(bizWorkSn), mentorId);
        //    //string a = scMentorMapping.MentorId;
        //    var usrView =
        //        Mapper.Map<JoinMentorViewModel>(vcMentorMapping);

        //    return View(usrView);
        //}

        //[HttpPost]
        //public async Task<JsonResult> DoLoginIdSelect(string LoginId)
        //{
        //    bool result = await _scUsrService.ChkLoginId(LoginId);

        //    if (result.Equals(true))
        //    {
        //        return Json(new { result = true });
        //    }
        //    else
        //    {
        //        return Json(new { result = false });
        //    }

        //}

        public async Task <ActionResult> MentoringReportList(SelectedMentorReportParmModel param, string curPage)
        {
            ViewBag.naviLeftMenu = Global.MentorMng;

            // baLoginKey get
            var baLoginKey = Session[Global.LoginID].ToString();
            // baSn get
            var baSnObj = await vcBaInfoService.getVcBaInfoByKey(int.Parse(baLoginKey));

            // basn -> vcmentorinfo get
            var mentorInfoList = await vcMentorInfoService.getVcMentorInfoListByBaSn(baSnObj.BaSn);

            // foreach (mentor일지같이.. list에 add)
            List <MentoringReportViewModel> mrList = new List <MentoringReportViewModel>();

            if (mentorInfoList.Count > 0)
            {
                foreach (var miObj in mentorInfoList)
                {
                    var mentorIdObj = await _vcUsrService.getUsrInfoByTcmsKey(miObj.TcmsLoginKey);

                    var mentorId = mentorIdObj.LoginId;
                    // 추가...
                    var scMentoringReportObj = await _scMentoringReportService.getMentoringReportListById(mentorId);

                    if (scMentoringReportObj.Count > 0)
                    {
                        var viewObj = Mapper.Map <List <MentoringReportViewModel> >(scMentoringReportObj);

                        foreach (var vObj in viewObj)
                        {
                            var compNmObj = await _vcCompInfoService.getVcCompInfoByCompSn(vObj.CompSn);

                            vObj.CompNm = compNmObj.CompNm;
                            var usrInfoObj = await _vcUsrService.getScUsrByLoginId(vObj.MentorId);

                            vObj.MentorNm = usrInfoObj.Name;
                            mrList.Add(vObj);
                        }
                    }
                }
                //검색조건을 유지하기 위한
                ViewBag.SelectParam = param;

                //맨토링 일지 정보 조회
                int pagingSize = int.Parse(ConfigurationManager.AppSettings["PagingSize"]);
                //if (curPage == "")
                //{
                //    curPage = "1";
                //}
                //var pList = mrList.ToPagedList(int.Parse(curPage), pagingSize);
                //return View(pList);
                return(View(new StaticPagedList <MentoringReportViewModel>(mrList, int.Parse(curPage ?? "1"), pagingSize, mrList.Count)));
            }
            else
            {
                return(View());
            }
            // 뷰 보이기

            //var mentorId = Session[Global.LoginID].ToString();

            //SqlParameter loginId = new SqlParameter("LOGIN_ID", Session[Global.LoginID].ToString());
            //object[] parameters = new object[] { loginId };
            //var listObj = await procMngService.getBaMentoringReport(parameters);
            //var reportList = listObj;/*.Where(bw => bw.CLASSIFY == "A").ToList();*/

            //ViewBag.SelectCompInfoList = ReportHelper.MakeCompanyListByBa(listObj);                 // 기업명 dropdownlist

            ////검색조건을 유지하기 위한
            //ViewBag.SelectParam = param;

            ////맨토링 일지 정보 조회
            //int pagingSize = int.Parse(ConfigurationManager.AppSettings["PagingSize"]);

            ////맨토링 일지 정보 to 뷰모델 매핑
            //var listTotalReportView =
            //   Mapper.Map<List<MentoringReportViewModel>>(reportList);

            //return View(new StaticPagedList<MentoringReportViewModel>(listTotalReportView, int.Parse(curPage ?? "1"), pagingSize, listTotalReportView.Count));
        }