public async Task<int> AddRptMngCommentAsync(RptMngComment rptMngComment) { var result = rptMngCommentRepository.Insert(rptMngComment); if (result == null) { return -1; } return await SaveDbContextAsync(); }
public RptMngComment Insert(RptMngComment rptMngComment) { return rptMngCommentRepository.Insert(rptMngComment); }
public static CommentViewModel MakeCommentViewModel(string detailCode, RptMngComment rptMngComment = null) { CommentViewModel viewModel = new CommentViewModel(); if (rptMngComment == null) { viewModel.DetailCd = detailCode; viewModel.Comment = ""; } else { viewModel.DetailCd = rptMngComment.DetailCd; viewModel.Comment = rptMngComment.Comment; } return viewModel; }