Ejemplo n.º 1
0
        public async Task<ActionResult> BasicSurveyComplete(QuesViewModel quesViewModel)
        {
            ViewBag.LeftMenu = Global.Report;
            int questionSn = quesViewModel.QuestionSn;
            string compSn = Session[Global.CompSN].ToString();

            if (quesViewModel.QuestionSn > 0)
            {
                var quesMaster = await _quesMasterService.GetQuesMasterAsync(questionSn);
                quesMaster.Status = "C";
                await _quesMasterService.SaveDbContextAsync();

                var compMappings = await _scCompMappingService.GetCompMappingsForCompanyAsync(int.Parse(compSn));
                for(int i = 0; i < compMappings.Count; i++)
                {
                    RptMaster rptMaster = new RptMaster();
                    rptMaster.BasicYear = quesMaster.BasicYear.Value;
                    rptMaster.BizWorkSn = compMappings[i].BizWorkSn;
                    rptMaster.Status = "T";
                    rptMaster.QuestionSn = questionSn;
                    rptMaster.CompSn = int.Parse(compSn);
                    rptMaster.MentorId = compMappings[i].MentorId;
                    rptMaster.RegDt = DateTime.Now;
                    rptMaster.RegId = Session[Global.LoginID].ToString();

                    await _rptMasterService.AddRptMasterAsync(rptMaster);
                }

            }
            else
            {
                //에러처리 필요
                return View(quesViewModel);
            }

            return RedirectToAction("BasicSurvey", "Report", new { area = "Company" });
        }
Ejemplo n.º 2
0
        public ActionResult BizCheck01(string questionSn, string status)
        {
            ViewBag.LeftMenu = Global.Report;

            var viewModel = new QuesViewModel();
            viewModel.QuestionSn = int.Parse(questionSn);
            viewModel.Status = status;
            return View(viewModel);
        }
Ejemplo n.º 3
0
 public ActionResult Summary02(string questionSn, string status)
 {
     ViewBag.LeftMenu = Global.Report;
     var quesViewModel = new QuesViewModel();
     quesViewModel.QuestionSn = int.Parse(questionSn);
     quesViewModel.Status = status;
     return View(quesViewModel);
 }