private void LoadTemplate(long idCall)
        {
            BaseForPaper call = CallService.GetCall(idCall);

            if (call == null)
            {
                View.LoadUnknowCall(View.IdCommunity, View.IdCallModule, idCall, View.CallType);
            }
            else
            {
                dtoManagerTemplateMail template = CallService.GetManagerTemplateMail(idCall);
                if (template == null)
                {
                    View.DisplayNoTemplate();
                    template = View.GetDefaultTemplate;
                    litePerson person = CurrentManager.GetLitePerson(UserContext.CurrentUserID);

                    template.NotifyTo = (call.CreatedBy != null) ? call.CreatedBy.Mail : "";

                    if (person != null && call.CreatedBy != null && person.Id != call.CreatedBy.Id)
                    {
                        template.NotifyTo = (string.IsNullOrEmpty(template.NotifyTo)) ? "" : ";" + person.Mail;
                    }
                }
                View.LoadTemplate(template);
            }
        }
        private void LoadCommittees(long idCall, Boolean allowUseOfDssMethods)
        {
            BaseForPaper call = CallService.GetCall(idCall);

            if (call != null)
            {
                LoadCommittees(call, allowUseOfDssMethods);
            }
        }
Beispiel #3
0
        private void LoadSections(long idCall)
        {
            BaseForPaper call = CallService.GetCall(idCall);

            if (call != null)
            {
                LoadSections(call);
            }
        }
Beispiel #4
0
        private void LoadCommittees(long idCall)
        {
            BaseForPaper call = CallService.GetCall(idCall);

            if (call != null)
            {
                View.CommiteesWithEvaluationsCompleted = Service.GetIdCommitteesWithEvaluationCompleted(idCall);
                LoadCommittees(call);
            }
        }
 public void AddFilesToItem(long idCall, CallForPaperType type)
 {
     if (UserContext.isAnonymous)
     {
         View.DisplayWorkingSessionExpired();
     }
     else
     {
         BaseForPaper call     = CallService.GetCall(idCall);
         Int32        idModule = (type == CallForPaperType.CallForBids ? CurrentIdCallModule : currentIdRequestModule);
         if (call == null)
         {
             View.DisplayCallNotFound(type);
             if (type == CallForPaperType.CallForBids)
             {
                 View.SendUserAction(View.IdCallCommunity, idModule, idCall, 0, ModuleCallForPaper.ActionType.UploadFileToUnknownCall);
             }
             else
             {
                 View.SendUserAction(View.IdCallCommunity, idModule, idCall, 0, ModuleRequestForMembership.ActionType.UploadFileToUnknownCall);
             }
         }
         else
         {
             List <lm.Comol.Core.FileRepository.Domain.dtoModuleUploadedItem> files = null;
             Int32  idObjectType = (Int32)ModuleCallForPaper.ObjectType.AttachmentFile;
             Int32  idObjAction  = (Int32)ModuleCallForPaper.ActionType.DownloadCallForPaperFile;
             String moduleCode   = ModuleCallForPaper.UniqueCode;
             if (type != CallForPaperType.CallForBids)
             {
                 idObjectType = (Int32)ModuleRequestForMembership.ObjectType.AttachmentFile;
                 idObjAction  = (Int32)ModuleRequestForMembership.ActionType.DownloadCallFile;
                 moduleCode   = ModuleRequestForMembership.UniqueCode;
             }
             files = View.UploadFiles(moduleCode, idObjectType, idObjAction, false);
             if (files != null && files.Any(f => f.IsAdded))
             {
                 if (CallService.UploadAttachments(call, files.Where(f => f.IsAdded).ToList(), moduleCode, idModule, View.IdCallCommunity, idObjectType))
                 {
                     View.DisplayItemsAdded();
                 }
                 else
                 {
                     View.DisplayItemsNotAdded();
                 }
             }
             else
             {
                 View.DisplayNoFilesToAdd();
             }
         }
     }
 }
        public List <lm.Comol.Core.Dss.Domain.Templates.dtoItemWeightBase> RequireCommitteesWeight(long idCall, Boolean fuzzyWeights, Boolean orderedWeights, List <dtoCommittee> committees)
        {
            BaseForPaper call = CallService.GetCall(idCall);

            if (call != null)
            {
                return(GetAvailableWeights(call, fuzzyWeights, orderedWeights, committees, true));
            }
            else
            {
                return(new List <dtoItemWeightBase>());
            }
        }
Beispiel #7
0
        private void DisplayMessage(long idCall, Boolean forAdd)
        {
            Boolean missing = !(CallService.GetTemplateStatus(CallService.GetCall(idCall), WizardCallStep.SubmitterTemplateMail) == Core.Wizard.WizardItemStatus.valid);

            if (forAdd)
            {
                View.DisplayTemplateAdded(missing);
            }
            else
            {
                View.DisplaySettingsSaved(missing);
            }
        }
 public async Task <IEnumerable <DTOCall> > GetCall()
 {
     return(await _service.GetCall());
 }