コード例 #1
0
        public static CheckBoxViewModel MakeCheckBoxViewModel(BasicSurveyReportViewModel paramModel, string detailCode, RptMentorComment rptMentorComment = null)
        {
            var viewModel = new CheckBoxViewModel();

            if (rptMentorComment == null)
            {
                viewModel.DetailCd = detailCode;
                viewModel.CheckVal = false;
            }
            else
            {
                viewModel.DetailCd = rptMentorComment.DetailCd;
                viewModel.CheckVal = bool.Parse(rptMentorComment.Comment);
            }

            return viewModel;
        }
コード例 #2
0
        public static RptMentorComment MakeRptMentorcomment(CheckBoxViewModel viewModel, BasicSurveyReportViewModel paramModel)
        {
            RptMentorComment rptComment = new RptMentorComment();
            rptComment.DetailCd = viewModel.DetailCd;
            rptComment.Comment = viewModel.CheckVal.ToString();
            rptComment.BasicYear = paramModel.BizWorkYear;
            rptComment.BizWorkSn = paramModel.BizWorkSn;
            rptComment.QuestionSn = paramModel.QuestionSn;

            return rptComment;
        }