public async Task <int> AddRptMentorCommentAsync(RptMentorComment rptMentorComment) { var result = rptMentorCommentRepository.Insert(rptMentorComment); if (result == null) { return(-1); } return(await SaveDbContextAsync()); }
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); }
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); }
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)); }