Beispiel #1
0
        public HttpResponseMessage GetListAuthorOfPaperText(int paperId)
        {
            var paper = db.PAPER_TEXT.Find(paperId);
            var model = new PaperAbstractModel();

            if (paper == null)
            {
                return(ResponseFail(StringResource.Paper_text_do_not_exist));
            }
            else
            {
                var listAuthor = (from a in db.AUTHOR_PAPER_TEXT_RELATIONSHIP
                                  join au in db.AUTHORs on a.PERSON_ID equals au.PERSON_ID
                                  join p in db.People on a.PERSON_ID equals p.PERSON_ID
                                  where a.PAPER_ID == paperId && au.CONFERENCE_ID == a.CONFERENCE_ID
                                  select new { a, au, p })
                                 .AsEnumerable()
                                 .Distinct()
                                 .Select(x => new
                {
                    x.a.PERSON_ID,
                    x.a.CONFERENCE_ID,
                    x.a.PAPER_ID,
                    x.au.CURRENT_FIRST_NAME,
                    x.au.CURRENT_MIDDLE_NAME,
                    x.au.CURRENT_LAST_NAME,
                    FULL_NAME = Utils.GetFullName(x.au.CURRENT_FIRST_NAME, x.au.CURRENT_MIDDLE_NAME, x.au.CURRENT_LAST_NAME),
                    x.p.CURRENT_PERSONAL_EMAIL
                }).Distinct();
                return(ResponseSuccess(StringResource.Success, listAuthor));
            }
        }
Beispiel #2
0
        public HttpResponseMessage ListSubmitingHistoryPaperText(int paperId)
        {
            var paperText       = db.PAPER_TEXT.Find(paperId);
            var paperAbstract   = db.PAPER_ABSTRACT.Find(paperId);
            var model           = new PaperAbstractModel();
            var myPaperAbstract = model.getMyPaperAbstract(paperAbstract);

            if (paperText == null)
            {
                return(ResponseFail(StringResource.Paper_text_do_not_exist));
            }
            else if (paperAbstract == null)
            {
                return(ResponseFail(StringResource.Paper_abstract_do_not_exist));
            }
            else
            {
                var listObj = new List <ListPaperTextSubmit>();
                if (!String.IsNullOrEmpty(paperText.PAPER_TEXT_TITLE_1) || !String.IsNullOrEmpty(paperText.PAPER_TEXT_TITLE_EN_1))
                {
                    var listPaperText = new ListPaperTextSubmit();
                    listPaperText.PAPER_TEXT_TITLE                     = paperText.PAPER_TEXT_TITLE_1;
                    listPaperText.PAPER_TEXT_TITLE_EN                  = paperText.PAPER_TEXT_TITLE_EN_1;
                    listPaperText.PAPER_TEXT                           = paperText.PAPER_TEXT_1;
                    listPaperText.PAPER_TEXT_EN                        = paperText.PAPER_TEXT_EN_1;
                    listPaperText.CONFERENCE_SESSION_TOPIC_ID          = myPaperAbstract.CONFERENCE_SESSION_TOPIC_ID;
                    listPaperText.CONFERENCE_SESSION_TOPIC_NAME        = myPaperAbstract.CONFERENCE_SESSION_TOPIC_NAME;
                    listPaperText.CONFERENCE_SESSION_TOPIC_NAME_EN     = myPaperAbstract.CONFERENCE_SESSION_TOPIC_NAME_EN;
                    listPaperText.TYPE_OF_STUDY_ID                     = myPaperAbstract.TYPE_OF_STUDY_ID;
                    listPaperText.TYPE_OF_STUDY_NAME                   = myPaperAbstract.TYPE_OF_STUDY_NAME;
                    listPaperText.TYPE_OF_STUDY_NAME_EN                = myPaperAbstract.TYPE_OF_STUDY_NAME_EN;
                    listPaperText.CONFERENCE_PRESENTATION_TYPE_ID      = myPaperAbstract.CONFERENCE_PRESENTATION_TYPE_ID;
                    listPaperText.CONFERENCE_PRESENTATION_TYPE_NAME    = myPaperAbstract.CONFERENCE_PRESENTATION_TYPE_NAME;
                    listPaperText.CONFERENCE_PRESENTATION_TYPE_NAME_EN = myPaperAbstract.CONFERENCE_PRESENTATION_TYPE_NAME_EN;
                    listPaperText.PAPER_TEXT_ATTACHED_FILENAME         = paperText.PAPER_TEXT_ATTACHED_FILENAME_1;
                    listPaperText.NUMBER_OF_PAGES_OF_PAPER_TEXT        = paperText.NUMBER_OF_PAGES_OF_PAPER_TEXT_1;
                    listPaperText.FIRST_SUBMITTED_DATE                 = paperText.FIRST_SUBMITTED_DATE_1;
                    listPaperText.LAST_REVISED_DATE                    = paperText.LAST_REVISED_DATE_1;
                    listObj.Add(listPaperText);
                }
                if (!String.IsNullOrEmpty(paperText.PAPER_TEXT_TITLE_2) || !String.IsNullOrEmpty(paperText.PAPER_TEXT_TITLE_2))
                {
                    var listPaperText = new ListPaperTextSubmit();
                    listPaperText.PAPER_TEXT_TITLE                     = paperText.PAPER_TEXT_TITLE_2;
                    listPaperText.PAPER_TEXT_TITLE_EN                  = paperText.PAPER_TEXT_TITLE_EN_2;
                    listPaperText.PAPER_TEXT                           = paperText.PAPER_TEXT_2;
                    listPaperText.PAPER_TEXT_EN                        = paperText.PAPER_TEXT_EN_2;
                    listPaperText.CONFERENCE_SESSION_TOPIC_ID          = myPaperAbstract.CONFERENCE_SESSION_TOPIC_ID;
                    listPaperText.CONFERENCE_SESSION_TOPIC_NAME        = myPaperAbstract.CONFERENCE_SESSION_TOPIC_NAME;
                    listPaperText.CONFERENCE_SESSION_TOPIC_NAME_EN     = myPaperAbstract.CONFERENCE_SESSION_TOPIC_NAME_EN;
                    listPaperText.TYPE_OF_STUDY_ID                     = myPaperAbstract.TYPE_OF_STUDY_ID;
                    listPaperText.TYPE_OF_STUDY_NAME                   = myPaperAbstract.TYPE_OF_STUDY_NAME;
                    listPaperText.TYPE_OF_STUDY_NAME_EN                = myPaperAbstract.TYPE_OF_STUDY_NAME_EN;
                    listPaperText.CONFERENCE_PRESENTATION_TYPE_ID      = myPaperAbstract.CONFERENCE_PRESENTATION_TYPE_ID;
                    listPaperText.CONFERENCE_PRESENTATION_TYPE_NAME    = myPaperAbstract.CONFERENCE_PRESENTATION_TYPE_NAME;
                    listPaperText.CONFERENCE_PRESENTATION_TYPE_NAME_EN = myPaperAbstract.CONFERENCE_PRESENTATION_TYPE_NAME_EN;
                    listPaperText.PAPER_TEXT_ATTACHED_FILENAME         = paperText.PAPER_TEXT_ATTACHED_FILENAME_2;
                    listPaperText.NUMBER_OF_PAGES_OF_PAPER_TEXT        = paperText.NUMBER_OF_PAGES_OF_PAPER_TEXT_2;
                    listPaperText.FIRST_SUBMITTED_DATE                 = paperText.FIRST_SUBMITTED_DATE_2;
                    listPaperText.LAST_REVISED_DATE                    = paperText.LAST_REVISED_DATE_2;
                    listObj.Add(listPaperText);
                }
                if (!String.IsNullOrEmpty(paperText.PAPER_TEXT_TITLE_3) || !String.IsNullOrEmpty(paperText.PAPER_TEXT_TITLE_3))
                {
                    var listPaperText = new ListPaperTextSubmit();
                    listPaperText.PAPER_TEXT_TITLE                     = paperText.PAPER_TEXT_TITLE_3;
                    listPaperText.PAPER_TEXT_TITLE_EN                  = paperText.PAPER_TEXT_TITLE_EN_3;
                    listPaperText.PAPER_TEXT                           = paperText.PAPER_TEXT_3;
                    listPaperText.PAPER_TEXT_EN                        = paperText.PAPER_TEXT_EN_3;
                    listPaperText.CONFERENCE_SESSION_TOPIC_ID          = myPaperAbstract.CONFERENCE_SESSION_TOPIC_ID;
                    listPaperText.CONFERENCE_SESSION_TOPIC_NAME        = myPaperAbstract.CONFERENCE_SESSION_TOPIC_NAME;
                    listPaperText.CONFERENCE_SESSION_TOPIC_NAME_EN     = myPaperAbstract.CONFERENCE_SESSION_TOPIC_NAME_EN;
                    listPaperText.TYPE_OF_STUDY_ID                     = myPaperAbstract.TYPE_OF_STUDY_ID;
                    listPaperText.TYPE_OF_STUDY_NAME                   = myPaperAbstract.TYPE_OF_STUDY_NAME;
                    listPaperText.TYPE_OF_STUDY_NAME_EN                = myPaperAbstract.TYPE_OF_STUDY_NAME_EN;
                    listPaperText.CONFERENCE_PRESENTATION_TYPE_ID      = myPaperAbstract.CONFERENCE_PRESENTATION_TYPE_ID;
                    listPaperText.CONFERENCE_PRESENTATION_TYPE_NAME    = myPaperAbstract.CONFERENCE_PRESENTATION_TYPE_NAME;
                    listPaperText.CONFERENCE_PRESENTATION_TYPE_NAME_EN = myPaperAbstract.CONFERENCE_PRESENTATION_TYPE_NAME_EN;
                    listPaperText.PAPER_TEXT_ATTACHED_FILENAME         = paperText.PAPER_TEXT_ATTACHED_FILENAME_3;
                    listPaperText.NUMBER_OF_PAGES_OF_PAPER_TEXT        = paperText.NUMBER_OF_PAGES_OF_PAPER_TEXT_3;
                    listPaperText.FIRST_SUBMITTED_DATE                 = paperText.FIRST_SUBMITTED_DATE_3;
                    listPaperText.LAST_REVISED_DATE                    = paperText.LAST_REVISED_DATE_3;
                    listObj.Add(listPaperText);
                }
                if (!String.IsNullOrEmpty(paperText.PAPER_TEXT_TITLE_4) || !String.IsNullOrEmpty(paperText.PAPER_TEXT_TITLE_4))
                {
                    var listPaperText = new ListPaperTextSubmit();
                    listPaperText.PAPER_TEXT_TITLE                     = paperText.PAPER_TEXT_TITLE_4;
                    listPaperText.PAPER_TEXT_TITLE_EN                  = paperText.PAPER_TEXT_TITLE_EN_4;
                    listPaperText.PAPER_TEXT                           = paperText.PAPER_TEXT_4;
                    listPaperText.PAPER_TEXT_EN                        = paperText.PAPER_TEXT_EN_4;
                    listPaperText.CONFERENCE_SESSION_TOPIC_ID          = myPaperAbstract.CONFERENCE_SESSION_TOPIC_ID;
                    listPaperText.CONFERENCE_SESSION_TOPIC_NAME        = myPaperAbstract.CONFERENCE_SESSION_TOPIC_NAME;
                    listPaperText.CONFERENCE_SESSION_TOPIC_NAME_EN     = myPaperAbstract.CONFERENCE_SESSION_TOPIC_NAME_EN;
                    listPaperText.TYPE_OF_STUDY_ID                     = myPaperAbstract.TYPE_OF_STUDY_ID;
                    listPaperText.TYPE_OF_STUDY_NAME                   = myPaperAbstract.TYPE_OF_STUDY_NAME;
                    listPaperText.TYPE_OF_STUDY_NAME_EN                = myPaperAbstract.TYPE_OF_STUDY_NAME_EN;
                    listPaperText.CONFERENCE_PRESENTATION_TYPE_ID      = myPaperAbstract.CONFERENCE_PRESENTATION_TYPE_ID;
                    listPaperText.CONFERENCE_PRESENTATION_TYPE_NAME    = myPaperAbstract.CONFERENCE_PRESENTATION_TYPE_NAME;
                    listPaperText.CONFERENCE_PRESENTATION_TYPE_NAME_EN = myPaperAbstract.CONFERENCE_PRESENTATION_TYPE_NAME_EN;
                    listPaperText.PAPER_TEXT_ATTACHED_FILENAME         = paperText.PAPER_TEXT_ATTACHED_FILENAME_4;
                    listPaperText.NUMBER_OF_PAGES_OF_PAPER_TEXT        = paperText.NUMBER_OF_PAGES_OF_PAPER_TEXT_4;
                    listPaperText.FIRST_SUBMITTED_DATE                 = paperText.FIRST_SUBMITTED_DATE_4;
                    listPaperText.LAST_REVISED_DATE                    = paperText.LAST_REVISED_DATE_4;
                    listObj.Add(listPaperText);
                }
                if (!String.IsNullOrEmpty(paperText.PAPER_TEXT_TITLE_5) || !String.IsNullOrEmpty(paperText.PAPER_TEXT_TITLE_5))
                {
                    var listPaperText = new ListPaperTextSubmit();
                    listPaperText.PAPER_TEXT_TITLE                     = paperText.PAPER_TEXT_TITLE_5;
                    listPaperText.PAPER_TEXT_TITLE_EN                  = paperText.PAPER_TEXT_TITLE_EN_5;
                    listPaperText.PAPER_TEXT                           = paperText.PAPER_TEXT_5;
                    listPaperText.PAPER_TEXT_EN                        = paperText.PAPER_TEXT_EN_5;
                    listPaperText.CONFERENCE_SESSION_TOPIC_ID          = myPaperAbstract.CONFERENCE_SESSION_TOPIC_ID;
                    listPaperText.CONFERENCE_SESSION_TOPIC_NAME        = myPaperAbstract.CONFERENCE_SESSION_TOPIC_NAME;
                    listPaperText.CONFERENCE_SESSION_TOPIC_NAME_EN     = myPaperAbstract.CONFERENCE_SESSION_TOPIC_NAME_EN;
                    listPaperText.TYPE_OF_STUDY_ID                     = myPaperAbstract.TYPE_OF_STUDY_ID;
                    listPaperText.TYPE_OF_STUDY_NAME                   = myPaperAbstract.TYPE_OF_STUDY_NAME;
                    listPaperText.TYPE_OF_STUDY_NAME_EN                = myPaperAbstract.TYPE_OF_STUDY_NAME_EN;
                    listPaperText.CONFERENCE_PRESENTATION_TYPE_ID      = myPaperAbstract.CONFERENCE_PRESENTATION_TYPE_ID;
                    listPaperText.CONFERENCE_PRESENTATION_TYPE_NAME    = myPaperAbstract.CONFERENCE_PRESENTATION_TYPE_NAME;
                    listPaperText.CONFERENCE_PRESENTATION_TYPE_NAME_EN = myPaperAbstract.CONFERENCE_PRESENTATION_TYPE_NAME_EN;
                    listPaperText.PAPER_TEXT_ATTACHED_FILENAME         = paperText.PAPER_TEXT_ATTACHED_FILENAME_5;
                    listPaperText.NUMBER_OF_PAGES_OF_PAPER_TEXT        = paperText.NUMBER_OF_PAGES_OF_PAPER_TEXT_5;
                    listPaperText.FIRST_SUBMITTED_DATE                 = paperText.FIRST_SUBMITTED_DATE_5;
                    listPaperText.LAST_REVISED_DATE                    = paperText.LAST_REVISED_DATE_5;
                    listObj.Add(listPaperText);
                }
                return(ResponseSuccess(StringResource.Success, listObj));
            }
        }