Exemplo n.º 1
0
        private void LoadRevision(dtoBaseForPaper call, dtoSubmissionRevision sub, dtoRevisionRequest rev)
        {
            switch (call.Type)
            {
            case CallForPaperType.CallForBids:
                dtoCall dtoC = Service.GetDtoCall(call.Id);
                View.LoadCallInfo(dtoC);
                break;

            case CallForPaperType.RequestForMembership:
                dtoRequest dtoR = ServiceRequest.GetDtoRequest(call.Id);
                View.LoadCallInfo(dtoR);
                break;
            }
            View.LoadAttachments(Service.GetAvailableCallAttachments(call.Id, sub.Type.Id));

            View.DisplayPendingRequest(rev);
            View.FieldsToReview = rev.ItemsToReview.Where(i => i.Deleted == BaseStatusDeleted.None).Select(i => i.IdField).ToList();
            if (rev.Status == RevisionStatus.Request)
            {
                LoadSections(call.Id, sub.Type.Id, sub.Id, sub.GetIdLastActiveRevision());
            }
            else
            {
                LoadSections(call.Id, sub.Type.Id, sub.Id, rev.Id);
            }
        }
Exemplo n.º 2
0
        private void LoadSections(long idCall, long idSubmission, dtoRevisionRequest rev)
        {
            BaseForPaper call = Service.GetCall(idCall);

            if (call != null)
            {
                LoadSections(call, idSubmission, rev);
            }
        }
Exemplo n.º 3
0
        public void RemoveFieldFile(long idSubmittedField, List <dtoSubmissionValueField> fields)
        {
            Int32 containerIdCommunity = (View.PreloadIdOtherCommunity != -1) ? View.PreloadIdOtherCommunity : View.IdCallCommunity;
            dtoRevisionRequest rev     = Service.GetRevisionRequest(View.IdRevision, false);

            if (rev == null)
            {
                if (View.PreloadView == CallStatusForSubmitters.Revisions)
                {
                    View.SetActionUrl(CallStandardAction.ViewRevisions, RootObject.ViewRevisions(View.CallType, CallStandardAction.List, View.IdCallCommunity, CallStatusForSubmitters.Revisions));
                }
                else
                {
                    View.SetActionUrl(CallStandardAction.List, RootObject.ViewCalls(View.IdCall, View.CallType, CallStandardAction.List, containerIdCommunity, View.PreloadView));
                }
            }
            else if (rev.AllowSubmission(View.InitSubmissionTime) && rev.AllowSave)
            {
                try
                {
                    Service.RemoveFieldFileValue(idSubmittedField);
                    switch (View.CallType)
                    {
                    case CallForPaperType.CallForBids:
                        View.SendUserAction(View.IdCallCommunity, View.IdCallModule, View.IdRevision, ModuleCallForPaper.ActionType.VirtualDeleteSubmittedFile);
                        break;

                    case CallForPaperType.RequestForMembership:
                        View.SendUserAction(View.IdCallCommunity, View.IdCallModule, View.IdRevision, ModuleRequestForMembership.ActionType.VirtualDeleteSubmittedFile);
                        break;
                    }
                }
                catch (Exception ex)
                {
                }
                SaveRevision(fields);
            }
            else
            {
                View.GoToUrl(RootObject.ViewSubmission(View.CallType, View.IdCall, View.IdSubmission, View.IdRevision, View.PreloadedUniqueID, false, false, View.PreloadView, containerIdCommunity, 0));
            }
        }
Exemplo n.º 4
0
        public void SaveRevision(List <dtoSubmissionValueField> fields)
        {
            dtoRevisionRequest rev = Service.GetRevisionRequest(View.IdRevision, false);

            if (rev != null && rev.AllowSubmission(View.InitSubmissionTime) && rev.AllowSave)
            {
                Boolean        tryToComplete = View.TryToComplete;
                UserSubmission sub           = SaveUserRevision(fields);
                if (sub != null)
                {
                    LoadSections(sub.Call, sub.Type.Id, sub.Id, View.IdRevision, (tryToComplete) ? Service.GetSubmissionFieldErrors(sub, View.IdRevision) : null);
                }
            }
            else if (rev != null)
            {
                View.GoToUrl(RootObject.ViewSubmission(View.CallType, View.IdCall, View.IdSubmission, View.IdRevision, View.PreloadedUniqueID, false, false, View.PreloadView, View.PreloadIdOtherCommunity, 0));
            }
            else
            {
                View.GoToUrl(RootObject.ViewCalls(View.IdCall, View.CallType, CallStandardAction.List, View.IdCallCommunity, View.PreloadView));
            }
        }
Exemplo n.º 5
0
        private void LoadSections(BaseForPaper call, long idSubmission, dtoRevisionRequest rev)
        {
            List <dtoCallSection <dtoSubmissionValueField> > sections = Service.GetSubmissionFields(Service.GetCall(View.IdCall), View.IdSubmitterType, idSubmission, rev.Id);
            Dictionary <long, FieldError> fieldsError = Service.GetSubmissionFieldErrors(idSubmission, View.IdRevision);

            if (sections != null && sections.Count > 0 && fieldsError != null)
            {
                sections.ForEach(s => s.Fields.ForEach(f => f.SetError(fieldsError)));
            }

            Boolean allowSelection = false;

            allowSelection = (rev.ItemsToReview.Count == 0 || !Service.RevisionIsReviewed(idSubmission, rev.Id, rev.ItemsToReview.Select(r => r.IdField).ToList()));

            sections.ForEach(s => s.Fields.ForEach(f => f.AllowSelection = allowSelection));

            View.CurrentStatus = rev.Status;
            View.FieldsToCheck = rev.ItemsToReview.Select(i => i.IdField).ToList();
            View.DisplayRevisionInfo(rev);
            View.InitializeExportControl((View.IdUserSubmitter == UserContext.CurrentUserID), View.IdUserSubmitter, call.Id, idSubmission, rev.Id, View.IdCallModule, View.IdCallCommunity, View.CallType);
            View.LoadSections(sections);
        }
Exemplo n.º 6
0
        public void InitView()
        {
            Boolean isAnonymousUser = UserContext.isAnonymous;
            long    idCall          = View.PreloadIdCall;

            CallForPaperType type         = Service.GetCallType(idCall);
            long             idSubmission = View.PreloadedIdSubmission;
            long             idRevision   = View.PreloadedIdRevision;
            Guid             uniqueId     = View.PreloadedUniqueID;

            dtoSubmissionRevision submission = Service.GetSubmissionWithRevisions(idSubmission, true);
            int idModule = (type == CallForPaperType.CallForBids) ? Service.ServiceModuleID() : ServiceRequest.ServiceModuleID();

            View.CallType = type;

            dtoBaseForPaper call        = Service.GetDtoBaseCall(idCall);
            int             idCommunity = SetCallCurrentCommunity(call);

            View.IdCall          = idCall;
            View.IdCallModule    = idModule;
            View.IdCallCommunity = idCommunity;

            View.IdSubmission = idSubmission;
            if (submission != null && (idRevision == 0 && submission.Revisions.Where(r => r.Id == idRevision && r.AllowSave).Any()))
            {
                idRevision = submission.GetIdWorkingRevision();
            }
            View.IdRevision = idRevision;
            Int32 containerIdCommunity = (View.PreloadIdOtherCommunity != -1) ? View.PreloadIdOtherCommunity : idCommunity;

            if (isAnonymousUser)
            {
                View.DisplaySessionTimeout();
            }
            else if (submission == null)
            {
                View.DisplayRevisionUnknown();
                View.SetActionUrl(CallStandardAction.ViewRevisions, RootObject.ViewRevisions(type, CallStandardAction.List, containerIdCommunity, CallStatusForSubmitters.Revisions));
            }
            else if (submission != null && (idRevision == 0 || submission.IsAnonymous || submission.IdPerson != UserContext.CurrentUserID))
            {
                if (idRevision == 0)
                {
                    View.DisplayRevisionUnavailable();
                }
                else
                {
                    View.DisplayNoPermission(idCommunity, idModule);
                }
                View.SetActionUrl(CallStandardAction.ViewRevisions, RootObject.ViewRevisions(type, CallStandardAction.List, containerIdCommunity, CallStatusForSubmitters.Revisions));
            }
            else
            {
                int        idUser     = UserContext.CurrentUserID;
                litePerson currenUser = GetCurrentUser(ref idUser);
                Boolean    allowView  = false;
                View.CallRepository = call.GetRepositoryIdentifier();
                switch (type)
                {
                case CallForPaperType.CallForBids:
                    ModuleCallForPaper module = Service.CallForPaperServicePermission(idUser, idCommunity);
                    allowView = (submission.Owner.Id == idUser || module.ManageCallForPapers || module.Administration || ((module.CreateCallForPaper || module.EditCallForPaper) && call.Owner.Id == idUser));
                    break;

                case CallForPaperType.RequestForMembership:
                    ModuleRequestForMembership moduleR = Service.RequestForMembershipServicePermission(idUser, idCommunity);
                    allowView = (submission.Owner.Id == idUser || moduleR.ManageBaseForPapers || moduleR.Administration || ((moduleR.CreateBaseForPaper || moduleR.EditBaseForPaper) && call.Owner.Id == idUser));
                    break;
                }
                View.IdSubmission    = idSubmission;
                View.IdSubmitterType = submission.Type.Id;
                View.TryToComplete   = false;

                dtoRevisionRequest rev = submission.GetWorkingRevision();

                View.InitializeView(Service.RevisionWithFileToUpload(idRevision));
                DateTime InitTime                = DateTime.Now;
                Boolean  allowTimeRevision       = rev.AllowSubmission(InitTime);
                Boolean  allowSave               = false;
                Boolean  allowCompleteSubmission = false;


                if (!allowTimeRevision && (rev.Status == RevisionStatus.Request || rev.Status == RevisionStatus.RequestAccepted || rev.Status == RevisionStatus.Required))
                {
                    View.DisplayRevisionTimeExpired();
                    switch (type)
                    {
                    case CallForPaperType.CallForBids:
                        View.SendUserAction(idCommunity, idModule, idRevision, ModuleCallForPaper.ActionType.ViewRevision);
                        break;

                    case CallForPaperType.RequestForMembership:
                        View.SendUserAction(idCommunity, idModule, idRevision, ModuleRequestForMembership.ActionType.ViewRevision);
                        break;
                    }
                }
                else
                {
                    idSubmission = (submission == null) ? 0 : submission.Id;
                    View.AllowDeleteSubmission = false;
                    //View.AllowDeleteSubmission = (submission != null && submission.Deleted == BaseStatusDeleted.None && submission.Status == SubmissionStatus.draft);
                    allowCompleteSubmission = allowTimeRevision && (rev != null && rev.Deleted == BaseStatusDeleted.None && rev.AllowSave);
                    allowSave = allowCompleteSubmission;
                    View.InitSubmissionTime = InitTime;

                    switch (type)
                    {
                    case CallForPaperType.CallForBids:
                        View.SendUserAction(idCommunity, idModule, idRevision, ModuleCallForPaper.ActionType.ViewRevision);
                        break;

                    case CallForPaperType.RequestForMembership:
                        View.SendUserAction(idCommunity, idModule, idRevision, ModuleRequestForMembership.ActionType.ViewRevision);
                        break;
                    }
                }
                View.AllowSave = allowSave;
                View.AllowCompleteSubmission = allowCompleteSubmission;
                LoadRevision(call, submission, rev);
                if (allowView)
                {
                    if (View.PreloadView == CallStatusForSubmitters.Revisions)
                    {
                        View.SetActionUrl(CallStandardAction.ViewRevisions, RootObject.ViewRevisions(type, CallStandardAction.List, containerIdCommunity, CallStatusForSubmitters.Revisions));
                    }
                    else
                    {
                        View.SetActionUrl(CallStandardAction.List, RootObject.ViewCalls(idCall, type, CallStandardAction.List, containerIdCommunity, View.PreloadView));
                    }
                }
            }
        }
Exemplo n.º 7
0
        public void SaveCompleteRevision(List <dtoSubmissionValueField> fields, String baseFilePath, String translationFileName, String webSiteUrl, dtoRevisionMessage message)
        {
            Int32              containerIdCommunity = (View.PreloadIdOtherCommunity != -1) ? View.PreloadIdOtherCommunity : View.IdCallCommunity;
            long               idSubmission         = this.View.IdSubmission;
            long               idCall     = View.IdCall;
            long               idRevision = View.IdRevision;
            UserSubmission     submission = Service.GetUserSubmission(View.IdSubmission);
            dtoRevisionRequest rev        = Service.GetRevisionRequest(View.IdRevision, false);

            if (submission != null && rev != null && rev.AllowSubmission(View.InitSubmissionTime) && rev.AllowSave)
            {
                submission = SaveUserRevision(fields);
                if (submission != null && rev != null)
                {
                    idSubmission       = submission.Id;
                    View.TryToComplete = true;
                    try
                    {
                        Int32      idUser = UserContext.CurrentUserID;
                        litePerson person = GetCurrentUser(ref idUser);
                        if (submission.Owner.Id == idUser)
                        {
                            Service.CompleteSubmissionRevision(submission, idRevision, idUser, View.InitSubmissionTime, baseFilePath, fields, translationFileName, webSiteUrl, message);
                            View.AllowCompleteSubmission = false;
                            View.AllowDeleteSubmission   = false;
                            View.AllowSave = false;
                            View.SendUserAction(View.IdCallCommunity, View.IdCallModule, idRevision, ModuleCallForPaper.ActionType.ConfirmSubmission);
                            View.GoToUrl(RootObject.FinalMessage(View.CallType, idCall, idSubmission, idRevision, submission.UserCode, false, false, View.PreloadView, containerIdCommunity));
                        }
                        else if (UserContext.isAnonymous)
                        {
                            View.DisplayCallUnavailableForPublic();
                        }
                        else
                        {
                            View.DisplaySessionTimeout();
                        }
                    }
                    catch (SubmissionStatusChange ex)
                    {
                        //View.AllowDeleteSubmission = (submission != null && submission.Deleted == BaseStatusDeleted.None && submission.Status == SubmissionStatus.draft);
                        View.LoadError(RevisionErrorView.StringValueSaving);
                    }
                    catch (SubmissionItemsEmpty ex)
                    {
                        Dictionary <long, FieldError> errors = Service.GetSubmissionFieldErrors(submission, idRevision);
                        View.AllowDeleteSubmission = (submission != null && submission.Deleted == BaseStatusDeleted.None && submission.Status == SubmissionStatus.draft);

                        View.LoadError((errors.ToList().Where(er => er.Value != FieldError.Mandatory).Any()) ? RevisionErrorView.InvalidFields : RevisionErrorView.RequiredItems);
                        LoadSections(submission.Call, submission.Type.Id, idSubmission, View.IdRevision, errors);
                    }
                    catch (SubmissionTimeExpired ex)
                    {
                        View.LoadError(RevisionErrorView.TimeExpired);
                    }
                    //View.InitSubmissionTime = DateTime.Now;
                }
            }
            else if (rev != null)
            {
                View.GoToUrl(RootObject.ViewSubmission(View.CallType, View.IdCall, View.IdSubmission, View.IdRevision, View.PreloadedUniqueID, false, false, View.PreloadView, containerIdCommunity, 0));
            }
            else
            {
                View.GoToUrl(RootObject.ViewCalls(View.IdCall, View.CallType, CallStandardAction.List, containerIdCommunity, View.PreloadView));
            }
        }
Exemplo n.º 8
0
        private void LoadRevisionInfos(Boolean allowAdmin, BaseForPaper call, dtoSubmissionRevision submission)
        {
            Boolean allowRevision = false;
            Boolean isOwner       = (submission.IdPerson == UserContext.CurrentUserID);

            switch (call.RevisionSettings)
            {
            case RevisionMode.OnlyManager:
                allowRevision = allowAdmin && !submission.IsAnonymous;
                break;

            case RevisionMode.ManagerSubmitter:
                allowRevision = (allowAdmin && !submission.IsAnonymous) || (isOwner && !submission.IsAnonymous);
                break;

            case RevisionMode.OnlySubmitter:
                allowRevision = (isOwner && !submission.IsAnonymous);
                break;

            default:
                allowRevision = false;
                break;
            }
            Boolean submissionRevision = !call.AdvacedEvaluation && (allowRevision && submission.Status >= SubmissionStatus.submitted && submission.Status != SubmissionStatus.rejected);

            // SE posso fare la revisione e NON ci sono revisioni in corso !
            View.AllowRevisionRequest = submissionRevision && submission.HasWorkingRevision() == false;

            dtoRevisionRequest revision        = submission.GetWorkingRevision();
            List <dtoRevision> acceptRevisions = submission.GetAcceptedRevisions();

            long currentRevision = View.IdRevision;

            if (allowAdmin && currentRevision > 0)
            {
                if (revision != null)
                {
                    Int32 version    = acceptRevisions.Where(r => r.Id <= currentRevision).Select(r => r.Number).Max();
                    Int32 subVersion = submission.Revisions.Where(r => r.Id > acceptRevisions.Where(a => a.IsActive && a.Id <= currentRevision).Select(t => t.Id).FirstOrDefault() && r.Id < currentRevision).Count() + 1;
                    //revision.SubVersion = subVersion;
                    //acceptRevisions.Insert(0,revision);

                    //if (currentRevision == revision.Id && revision.Status != RevisionStatus.Submitted) {
                    switch (revision.Type)
                    {
                    case RevisionType.UserRequired:
                        View.DisplayUserPendingRequest(revision, RootObject.UserReviewCall(View.CallType, View.IdCall, View.IdSubmission, revision.Id, CallStatusForSubmitters.Submitted, View.PreloadIdOtherCommunity));
                        break;

                    case RevisionType.Manager:
                        View.DisplayManagePendingRevision(revision, RootObject.UserReviewCall(View.CallType, View.IdCall, View.IdSubmission, revision.Id, CallStatusForSubmitters.Submitted, View.PreloadIdOtherCommunity));
                        break;
                    }
                    //}
                }
                if (submissionRevision && !submission.HasWorkingRevision())
                {
                    View.InitializeRevisionRequest(((allowAdmin) ? RevisionType.Manager : RevisionType.None));
                }
            }
            else
            {
                // Imposto le richieste di revisione
                if (submissionRevision && !submission.HasWorkingRevision())
                {
                    View.InitializeRevisionRequest((isOwner) ? RevisionType.UserRequired : ((allowAdmin) ? RevisionType.Manager : RevisionType.None));
                }
                if (revision != null && revision.Status != RevisionStatus.Submitted)
                {
                    View.IdPendingRevision = revision.Id;
                    if (isOwner)
                    {
                        switch (revision.Type)
                        {
                        case RevisionType.UserRequired:
                            View.DisplaySelfPendingRequest(revision, RootObject.UserReviewCall(View.CallType, View.IdCall, View.IdSubmission, revision.Id, CallStatusForSubmitters.Submitted, View.PreloadIdOtherCommunity));
                            break;

                        case RevisionType.Manager:
                            View.DisplayPendingRevision(revision, RootObject.UserReviewCall(View.CallType, View.IdCall, View.IdSubmission, revision.Id, CallStatusForSubmitters.Submitted, View.PreloadIdOtherCommunity));
                            break;
                        }
                    }

                    else if (allowAdmin)
                    {
                        switch (revision.Type)
                        {
                        case RevisionType.UserRequired:
                            View.DisplayUserPendingRequest(revision, RootObject.UserReviewCall(View.CallType, View.IdCall, View.IdSubmission, revision.Id, CallStatusForSubmitters.Submitted, View.PreloadIdOtherCommunity));
                            break;

                        case RevisionType.Manager:
                            View.DisplayManagePendingRevision(revision, RootObject.UserReviewCall(View.CallType, View.IdCall, View.IdSubmission, revision.Id, CallStatusForSubmitters.Submitted, View.PreloadIdOtherCommunity));
                            break;
                        }
                    }
                }
                if (revision == null || (revision != null && (revision.Id != View.IdRevision || revision.Status == RevisionStatus.Submitted)))
                {
                    View.DisplayRevisionInfo(submission.Revisions.Where(r => r.Id == View.IdRevision).FirstOrDefault());
                }
            }

            // Carico la lista delle revisioni attualmente accettate !
            View.LoadAvailableRevision(acceptRevisions, View.IdRevision);
        }
Exemplo n.º 9
0
        public void InitView()
        {
            Boolean isAnonymousUser = UserContext.isAnonymous;
            long    idCall          = View.PreloadIdCall;

            CallForPaperType type         = Service.GetCallType(idCall);
            long             idSubmission = View.PreloadedIdSubmission;
            long             idRevision   = View.PreloadedIdRevision;

            dtoSubmissionRevision submission = Service.GetSubmissionWithRevisions(idSubmission, true);
            int idModule = (type == CallForPaperType.CallForBids) ? Service.ServiceModuleID() : ServiceRequest.ServiceModuleID();

            View.CallType = type;

            dtoBaseForPaper call        = Service.GetDtoBaseCall(idCall);
            int             idCommunity = SetCallCurrentCommunity(call);

            View.IdCall          = idCall;
            View.IdCallModule    = idModule;
            View.IdCallCommunity = idCommunity;

            View.IdSubmission = idSubmission;
            if (submission != null && (idRevision == 0 && submission.Revisions.Where(r => r.Id == idRevision && r.AllowSave).Any()))
            {
                idRevision = submission.GetIdWorkingRevision();
            }
            View.IdRevision = idRevision;

            if (isAnonymousUser)
            {
                View.DisplaySessionTimeout();
            }
            else if (submission == null)
            {
                View.DisplayRevisionUnknown();
                if (View.PreloadFromManagement)
                {
                    View.SetActionUrl(RootObject.ViewSubmissions(type, idCall, idSubmission, idRevision, View.PreloadView, View.PreloadFilterSubmission, View.PreloadOrderSubmission, View.PreloadAscending, View.PreloadPageIndex, View.PreloadPageSize));
                }
                else
                {
                    View.SetActionUrl(RootObject.ViewRevisions(idRevision, type, View.PreloadAction, idCommunity, View.PreloadView));
                }
            }
            else if (submission != null && (idRevision == 0))
            {
                View.DisplayRevisionUnavailable();
                View.SetActionUrl(RootObject.ViewRevisions(idRevision, type, View.PreloadAction, idCommunity, View.PreloadView));
            }
            else
            {
                int        idUser     = UserContext.CurrentUserID;
                litePerson currenUser = GetCurrentUser(ref idUser);
                Boolean    allowView  = false;

                switch (type)
                {
                case CallForPaperType.CallForBids:
                    ModuleCallForPaper module = Service.CallForPaperServicePermission(idUser, idCommunity);
                    allowView = (submission.Owner.Id == idUser || module.ManageCallForPapers || module.Administration || ((module.CreateCallForPaper || module.EditCallForPaper) && call.Owner.Id == idUser));
                    break;

                case CallForPaperType.RequestForMembership:
                    ModuleRequestForMembership moduleR = Service.RequestForMembershipServicePermission(idUser, idCommunity);
                    allowView = (submission.Owner.Id == idUser || moduleR.ManageBaseForPapers || moduleR.Administration || ((moduleR.CreateBaseForPaper || moduleR.EditBaseForPaper) && call.Owner.Id == idUser));
                    break;
                }
                View.IdSubmission = idSubmission;

                if (idRevision == 0)
                {
                    idRevision = submission.GetIdLastActiveRevision();
                }
                dtoRevisionRequest rev = Service.GetRevisionRequest(idRevision, true);
                if (rev == null)
                {
                    View.DisplayRevisionUnknown();
                }
                else if (allowView)
                {
                    switch (type)
                    {
                    case CallForPaperType.CallForBids:
                        View.SendUserAction(idCommunity, idModule, idRevision, ModuleCallForPaper.ActionType.ViewRevision);
                        break;

                    case CallForPaperType.RequestForMembership:
                        View.SendUserAction(idCommunity, idModule, idRevision, ModuleRequestForMembership.ActionType.ViewRevision);
                        break;
                    }
                    LoadSubmission(call, submission, rev);
                }
                else
                {
                    View.DisplayNoPermission(idCommunity, idModule);
                }
                if (allowView)
                {
                    if (View.PreloadFromManagement)
                    {
                        View.SetActionUrl(RootObject.ViewSubmissions(type, idCall, idSubmission, idRevision, View.PreloadView, View.PreloadFilterSubmission, View.PreloadOrderSubmission, View.PreloadAscending, View.PreloadPageIndex, View.PreloadPageSize));
                    }
                    else
                    {
                        View.SetActionUrl(RootObject.ViewRevisions(idRevision, type, View.PreloadAction, idCommunity, View.PreloadView));
                    }
                }
            }
        }
Exemplo n.º 10
0
        private void LoadSubmission(dtoBaseForPaper call, dtoSubmissionRevision subRev, dtoRevisionRequest rev)
        {
            switch (call.Type)
            {
            case CallForPaperType.CallForBids:
                dtoCall dtoC = Service.GetDtoCall(call.Id);
                View.LoadCallInfo(dtoC);
                break;

            case CallForPaperType.RequestForMembership:
                dtoRequest dtoR = ServiceRequest.GetDtoRequest(call.Id);
                View.LoadCallInfo(dtoR);
                break;
            }

            View.IdSubmitterType = (subRev == null) ? 0 : subRev.Type.Id;
            String owner       = "";
            String submittedBy = "";

            if (subRev.Owner == null || subRev.Owner.TypeID == (int)UserTypeStandard.Guest)
            {
                owner = View.AnonymousOwnerName;
                Int32 idUser = 0;
                GetCurrentUser(ref idUser);
                View.IdUserSubmitter = idUser;
            }
            else
            {
                owner = subRev.Owner.SurnameAndName;
                View.IdUserSubmitter = subRev.Owner.Id;
            }

            if (subRev.SubmittedBy == null || subRev.SubmittedBy.TypeID == (int)UserTypeStandard.Guest)
            {
                submittedBy = View.AnonymousOwnerName;
            }
            else
            {
                submittedBy = subRev.SubmittedBy.SurnameAndName;
            }

            if (subRev.Deleted != BaseStatusDeleted.None)
            {
                View.LoadSubmissionInfo(subRev.Type.Name, owner, SubmissionStatus.deleted);
            }
            else if (!subRev.SubmittedOn.HasValue)
            {
                View.LoadSubmissionInfo(subRev.Type.Name, owner, subRev.Status);
            }
            else if (subRev.IdPerson == subRev.IdSubmittedBy)
            {
                View.LoadSubmissionInfo(subRev.Type.Name, owner, subRev.Status, subRev.SubmittedOn.Value);
            }
            else
            {
                View.LoadSubmissionInfo(subRev.Type.Name, owner, subRev.Status, subRev.SubmittedOn.Value, submittedBy);
            }

            LoadSections(call.Id, subRev.Id, rev);
        }