public async Task <ActionResult> CompanyList() { ViewBag.LeftMenu = Global.CompanyMng; //사업 DropDown List Data var scExpertsMapping = await _scExpertMappingService.GetExpertsAsync(Session[Global.LoginID].ToString()); var bizWorkDropDown = Mapper.Map <List <BizWorkDropDownModel> >(scExpertsMapping); //사업담당자 일 경우 담당 사업만 조회 BizWorkDropDownModel title = new BizWorkDropDownModel(); title.BizWorkSn = 0; title.BizWorkNm = "사업명 선택"; bizWorkDropDown.Insert(0, title); SelectList bizList = new SelectList(bizWorkDropDown, "BizWorkSn", "BizWorkNm"); ViewBag.SelectBizWorkList = bizList; ViewBag.SelectCompInfoList = ReportHelper.MakeCompanyList(null); var scCompMappings = await _scCompMappingService.GetExpertCompMappingsAsync(Session[Global.LoginID].ToString(), 0, 0); var companyList = Mapper.Map <List <ExpertCompanyViewModel> >(scCompMappings); int pagingSize = int.Parse(ConfigurationManager.AppSettings["PagingSize"]); return(View(new StaticPagedList <ExpertCompanyViewModel>(companyList.ToPagedList(1, pagingSize), 1, pagingSize, companyList.Count))); }
public async Task <ActionResult> BasicSurveyReport(string curPage) { ViewBag.LeftMenu = Global.Report; //var bizMngList = await scUsrService.GetBizManagerAsync(); var loginId = Session[Global.LoginID].ToString(); var expertMappings = await scExpertMappingService.GetExpertsAsync(loginId); var bizMngList = expertMappings.Select(s => s.ScBizWork.ScCompInfo).GroupBy(s => new { s.CompSn, s.CompNm }); var bizWorkMngr = new List <SelectListItem>(); bizWorkMngr.Add(new SelectListItem { Value = "0", Text = "사업관리기관 선택", Selected = true }); if (bizMngList != null) { foreach (var item in bizMngList) { bizWorkMngr.Add(new SelectListItem { Value = item.Key.CompSn.ToString(), Text = item.Key.CompNm.ToString() }); } } SelectList list = new SelectList(bizWorkMngr, "Value", "Text"); //사업관리기관 DownDown List Data ViewBag.SelectBizWorkMngrList = list; ViewBag.SelectBizWorkList = ReportHelper.MakeBizWorkList(null); return(View()); }