public async Task <int> AddRptMentorCommentAsync(RptMentorComment rptMentorComment)
        {
            var result = rptMentorCommentRepository.Insert(rptMentorComment);

            if (result == null)
            {
                return(-1);
            }
            return(await SaveDbContextAsync());
        }
Пример #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);
        }
Пример #3
0
        public static CheckBoxViewModel MakeCheckBoxViewModel(BasicSurveyReportViewModel paramModel, string detailCode, RptMentorComment rptMentorComment = null)
        {
            var viewModel = new CheckBoxViewModel();

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

            return(viewModel);
        }
Пример #4
0
        public static CommentViewModel MakeCommentViewModel(BasicSurveyReportViewModel paramModel, string detailCode, RptMentorComment rptMentorComment = null)
        {
            CommentViewModel viewModel = new CommentViewModel();

            if (rptMentorComment == null)
            {
                viewModel.DetailCd = detailCode;
                viewModel.Comment  = "";
            }
            else
            {
                viewModel.DetailCd = rptMentorComment.DetailCd;
                viewModel.Comment  = rptMentorComment.Comment;
            }

            return(viewModel);
        }
 public RptMentorComment Insert(RptMentorComment rptMentorComment)
 {
     return(rptMentorCommentRepository.Insert(rptMentorComment));
 }