public HttpResponseMessage ListReviewingHistoryPaperText(int paperId, int conferenceId, int reviewTime = 1) { var paper = db.PAPER_TEXT.Find(paperId); var model = new PaperTextModel(); if (paper == null) { return(ResponseFail(StringResource.Paper_text_do_not_exist)); } else { var paperText = model.getMyPaperText(paperId, reviewTime); var listReviewing = (from r in db.REVIEWER_PAPER_TEXT_RELATIONSHIP join b in db.CONFERENCE_BOARD_OF_REVIEW on r.CONFERENCE_BOARD_OF_REVIEW_ID equals b.CONFERENCE_BOARD_OF_REVIEW_ID join p in db.People on r.PERSON_ID equals p.PERSON_ID where r.PAPER_ID == paperId && r.CONFERENCE_ID == conferenceId && r.PAPER_TEXT_SUBMISSION_DEADLINE_ORDER_NUMBER == reviewTime && r.REVIEWED_DATE != null select new { r, b, p }) .AsEnumerable() .Select(x => new { x.r.PERSON_ID, x.r.CONFERENCE_BOARD_OF_REVIEW_ID, x.r.CONFERENCE_ID, x.r.PAPER_ID, REVIEW_CURRENT_FIRST_NAME = x.p.CURRENT_FIRST_NAME, REVIEW_CURRENT_MIDDLE_NAME = x.p.CURRENT_MIDDLE_NAME, REVIEW_CURRENT_LAST_NAME = x.p.CURRENT_LAST_NAME, REVIEW_FULL_NAME = Utils.GetFullName(x.p.CURRENT_FIRST_NAME, x.p.CURRENT_MIDDLE_NAME, x.p.CURRENT_LAST_NAME), paperText.PAPER_TEXT_TITLE, paperText.PAPER_TEXT_TITLE_EN, paperText.FIRST_SUBMITTED_DATE, paperText.LAST_REVISED_DATE, x.b.CONFERENCE_BOARD_OF_REVIEW_NAME, x.b.CONFERENCE_BOARD_OF_REVIEW_NAME_EN, x.r.PAPER_TEXT_SUBMISSION_DEADLINE_ORDER_NUMBER, x.r.REVIEWED_DATE, x.r.PROPOSED_REVISED_CONFERENCE_SESSION_TOPIC_ID, x.r.PROPOSED_REVISED_CONFERENCE_SESSION_TOPIC_NAME, x.r.PROPOSED_REVISED_CONFERENCE_SESSION_TOPIC_NAME_EN, x.r.PROPOSED_TYPE_OF_STUDY_ID, x.r.PROPOSED_TYPE_OF_STUDY_NAME, x.r.PROPOSED_TYPE_OF_STUDY_NAME_EN, x.r.PROPOSED_CONFERENCE_PRESENTATION_TYPE_ID, x.r.PROPOSED_CONFERENCE_PRESENTATION_TYPE_NAME, x.r.PROPOSED_CONFERENCE_PRESENTATION_TYPE_NAME_EN, x.r.PAPER_TEXT_REVIEW_RATING_POINT, x.r.SIGNIFICANT_REVISION_OR_MINIMAL_REVISION_OR_REVISION_NEEDED_OR_NO_REVISION_NEEDED, x.r.REVIEW_TEXT, x.r.REVIEW_TEXT_EN, x.r.APPROVAL_OR_REJECTION_OF_PAPER_TEXT, x.r.APPROVAL_OR_REJECTION_OF_PAPER_TEXT_DATE, }).Distinct().OrderByDescending(x => x.REVIEWED_DATE); return(ResponseSuccess(StringResource.Success, listReviewing)); } }
public HttpResponseMessage GetPaperText(int paperId) { var paper = db.PAPER_TEXT.Find(paperId); var model = new PaperTextModel(); if (paper == null) { return(ResponseFail(StringResource.Paper_text_do_not_exist)); } else { var paperAbstract = model.getMyPaperText(paper); return(ResponseSuccess(StringResource.Success, paperAbstract)); } }