public void SetAsDefaultOption(List <dtoCallSection <dtoCallField> > sections, long idOption, Boolean isDefault) { if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else { CallForPaperType type = View.CallType; long idCall = View.IdCall; Int32 idCommunity = View.IdCommunity; CallService.SaveSections(idCall, sections, View.TagCurrent); Boolean saved = CallService.SetAsDefaultOption(idOption, isDefault); if (!saved) { View.DisplayError(EditorErrors.SetAsDefaultOption); } else { if (View.CallType == CallForPaperType.CallForBids) { View.SendUserAction(idCommunity, View.IdCallModule, idCall, ModuleCallForPaper.ActionType.SetAsDefaultOption); } else { View.SendUserAction(idCommunity, View.IdCallModule, idCall, ModuleRequestForMembership.ActionType.SetAsDefaultOption); } View.ReloadEditor(RootObject.CallSubmissionEditorOptionRemoved(idOption, type, idCall, idCommunity, View.PreloadView)); } } }
private Boolean AllowStatusEdit(long idCall, CallForPaperType type, dtoBaseForPaper call, Boolean allowSave) { switch (type) { case CallForPaperType.CallForBids: switch (call.Status) { case CallForPaperStatus.Draft: return(allowSave || CallService.CallHasSubmissions(idCall)); case CallForPaperStatus.SubmissionClosed: return(allowSave && (!CallService.CallHasSubmissions(idCall) || (call.EndDate.HasValue == false || call.EndDate.HasValue && call.EndDate <= DateTime.Now))); case CallForPaperStatus.SubmissionsLimitReached: return(allowSave && CallService.CallHasSubmissions(idCall)); case CallForPaperStatus.SubmissionOpened: return(allowSave && (!CallService.CallHasSubmissions(idCall) || (call.EndDate.HasValue == false || call.EndDate.HasValue && call.EndDate <= DateTime.Now))); default: return(allowSave && !CallService.CallHasSubmissions(idCall)); } default: return(allowSave); } }
public void CloneSection(List <dtoCallSection <dtoCallField> > sections, long idSection) { if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else { CallForPaperType type = View.CallType; long idCall = View.IdCall; Int32 idCommunity = View.IdCommunity; FieldsSection section = CallService.CloneSection(idCall, sections, idSection); if (section == null) { View.DisplayError(EditorErrors.CloningSection); } else { if (View.CallType == CallForPaperType.CallForBids) { View.SendUserAction(idCommunity, View.IdCallModule, idCall, ModuleCallForPaper.ActionType.AddSectionToCall); } else { View.SendUserAction(idCommunity, View.IdCallModule, idCall, ModuleRequestForMembership.ActionType.AddSectionToRequest); } View.ReloadEditor(RootObject.CallSubmissionEditorSectionAdded(section.Id, type, idCall, idCommunity, View.PreloadView)); } } }
public void SaveSettings(List <dtoCallSection <dtoCallField> > sections) { if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else { CallForPaperType type = View.CallType; long idCall = View.IdCall; Int32 idCommunity = View.IdCommunity; if (!CallService.SaveSections(idCall, sections)) { View.DisplayError(EditorErrors.Saving); } else { LoadSections(View.IdCall); View.DisplaySettingsSaved(); if (View.CallType == CallForPaperType.CallForBids) { View.SendUserAction(idCommunity, View.IdCallModule, idCall, ModuleCallForPaper.ActionType.SaveCallSections); } else { View.SendUserAction(idCommunity, View.IdCallModule, idCall, ModuleRequestForMembership.ActionType.SaveCallSections); } } } }
public void AddOption(List <dtoCallSection <dtoCallField> > sections, long idField, String name, Boolean isDefault, Boolean isFreeText) { if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else { CallForPaperType type = View.CallType; long idCall = View.IdCall; Int32 idCommunity = View.IdCommunity; FieldOption option = CallService.AddOptionToField(idField, sections, name, isDefault, isFreeText); if (option == null) { View.DisplayError(EditorErrors.AddingOption); } else { if (View.CallType == CallForPaperType.CallForBids) { View.SendUserAction(idCommunity, View.IdCallModule, idCall, ModuleCallForPaper.ActionType.AddFieldOption); } else { View.SendUserAction(idCommunity, View.IdCallModule, idCall, ModuleRequestForMembership.ActionType.AddFieldOption); } View.ReloadEditor(RootObject.CallSubmissionEditorOptionAdded(option.Id, type, idCall, idCommunity, View.PreloadView)); } } }
public void SaveDisclaimerType(List <dtoCallSection <dtoCallField> > sections, long idField, DisclaimerType dType) { if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else { CallForPaperType type = View.CallType; long idCall = View.IdCall; Int32 idCommunity = View.IdCommunity; CallService.SaveSections(idCall, sections); Boolean saved = CallService.SaveDisclaimerType(idField, dType); if (!saved) { View.DisplayError(EditorErrors.EditingDisclaimerType); } else { if (View.CallType == CallForPaperType.CallForBids) { View.SendUserAction(idCommunity, View.IdCallModule, idCall, ModuleCallForPaper.ActionType.EditDisclaimerType); } else { View.SendUserAction(idCommunity, View.IdCallModule, idCall, ModuleRequestForMembership.ActionType.EditDisclaimerType); } View.ReloadEditor(RootObject.CallSubmissionEditorFieldRemoved(idField, type, idCall, idCommunity, View.PreloadView)); } } }
public void LoadCalls(CallForPaperType type, Boolean fromPortal, List <Int32> fromCommunities, List <Int32> removeUsers, Int32 pageIndex, Int32 pageSize) { List <dtoCallInfo> calls = Service.GetCallsForPersonAssignments(type, fromPortal, fromCommunities, removeUsers, View.UnknownCommunityName, View.PortalName); PagerBase pager = new PagerBase(); pager.PageSize = pageSize; //Me.View.CurrentPageSize pager.Count = calls.Count - 1; pager.PageIndex = pageIndex; // Me.View.CurrentPageIndex View.CallsPager = pager; if (calls != null && calls.Any()) { calls = calls.Skip(pager.PageIndex * pageSize).Take(pageSize).OrderBy(c => c.CommunityName).OrderBy(c => c.Name).OrderByDescending(c => c.EndDate).ToList(); if (calls.Any()) { View.LoadCalls(calls); } else { View.DisplayNoCallsAvailable(); } } else { View.DisplayNoCallsAvailable(); } }
public void LoadSubmissions(Int32 idCommunity, CallForPaperType type, dtoSubmissionFilters filters, int pageIndex, int pageSize) { Boolean allowManage = true; View.CurrentFilters = filters; switch (type) { case CallForPaperType.CallForBids: ModuleCallForPaper module = Service.CallForPaperServicePermission(UserContext.CurrentUserID, idCommunity); allowManage = (module.CreateCallForPaper || module.Administration || module.ManageCallForPapers || module.EditCallForPaper); break; case CallForPaperType.RequestForMembership: ModuleRequestForMembership moduleR = Service.RequestForMembershipServicePermission(UserContext.CurrentUserID, idCommunity); allowManage = (moduleR.CreateBaseForPaper || moduleR.Administration || moduleR.ManageBaseForPapers || moduleR.EditBaseForPaper); break; } if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else if (allowManage) { LoadSubmissions(allowManage, View.IdCall, type, filters, pageIndex, pageSize); } else { View.DisplayNoPermission(idCommunity, View.IdCallModule); } }
private void LoadAvailableCall(CallForPaperType type, Boolean fromPortal, List <Int32> fromCommunities, List <Int32> removeUsers) { View.FromCommunities = fromCommunities; View.FromPortal = fromPortal; View.CallsType = type; View.SelectedIdCall = 0; LoadCalls(type, fromPortal, fromCommunities, removeUsers, 0, View.CallsPageSize); }
public void LoadSections(long idCall, CallForPaperType type, long idSubmission, long idRevision, long idSubmitter, Boolean allowAdmin) { BaseForPaper call = ServiceCall.GetCall(idCall); if (call != null) { LoadSections(call, ServiceCall.GetSubmissionWithRevisions(idSubmission, true), allowAdmin); } }
public void RemoveOption(List <dtoCallSection <dtoCallField> > sections, long idOption) { if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else { long pIdOption = 0; long pIdSection = 0; long pIdField = 0; CallForPaperType type = View.CallType; long idCall = View.IdCall; Int32 idCommunity = View.IdCommunity; try { CallService.SaveSections(idCall, sections); if (CallService.VirtualDeleteFieldOption(idOption, true, ref pIdSection, ref pIdField, ref pIdOption)) { if (View.CallType == CallForPaperType.CallForBids) { View.SendUserAction(idCommunity, View.IdCallModule, idCall, ModuleCallForPaper.ActionType.VirtualDeleteFieldOption); } else { View.SendUserAction(idCommunity, View.IdCallModule, idCall, ModuleRequestForMembership.ActionType.VirtualDeleteFieldOption); } if (pIdOption != 0) { View.ReloadEditor(RootObject.CallSubmissionEditorOptionRemoved(pIdOption, type, idCall, idCommunity, View.PreloadView)); } else if (pIdField != 0) { View.ReloadEditor(RootObject.CallSubmissionEditorFieldRemoved(pIdField, type, idCall, idCommunity, View.PreloadView)); } else { View.ReloadEditor(RootObject.CallSubmissionEditorSectionRemoved(pIdSection, type, idCall, idCommunity, View.PreloadView)); } } else { View.DisplayError(EditorErrors.RemovingOption); } } catch (SubmissionLinked exSubmission) { View.DisplayError(EditorErrors.RemovingOption); } catch (Exception ex) { View.DisplayError(EditorErrors.RemovingOption); } } }
public void InitView() { long idCall = View.PreloadIdCall; dtoBaseForPaper call = null; CallForPaperType type = CallService.GetCallType(idCall); call = CallService.GetDtoBaseCall(idCall); int idCommunity = SetCallCurrentCommunity(call); if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else if (type != CallForPaperType.CallForBids) { View.RedirectToUrl(RootObject.ViewCalls(type, CallStandardAction.Manage, idCommunity, View.PreloadView)); } else { litePerson currenUser = CurrentManager.GetLitePerson(UserContext.CurrentUserID); ModuleCallForPaper module = CallService.CallForPaperServicePermission(UserContext.CurrentUserID, idCommunity); Boolean allowView = (module.ViewCallForPapers || module.Administration || module.ManageCallForPapers); Boolean allowManage = module.CreateCallForPaper || module.Administration || module.ManageCallForPapers || module.EditCallForPaper; Boolean allowSave = (module.Administration || module.ManageCallForPapers || (module.CreateCallForPaper && idCall == 0) || (call != null && module.EditCallForPaper && currenUser == call.Owner)); int idModule = CallService.ServiceModuleID(); View.IdCallModule = idModule; if (call == null) { View.LoadUnknowCall(idCommunity, idModule, idCall, type); } else if (Service.CallHasEvaluationStarted(idCall)) { View.RedirectToUrl(RootObject.EditCommiteeByStep(idCall, idCommunity, WizardEvaluationStep.ManageEvaluators, View.PreloadView)); } else if (allowManage || allowSave) { View.AllowSave = allowSave && (!Service.CallHasEvaluationStarted(idCall)); View.AllowAddEvaluator = View.AllowSave; View.IdCall = idCall; View.SetActionUrl(RootObject.ViewCalls(idCall, type, CallStandardAction.Manage, idCommunity, View.PreloadView)); LoadMembers(idCall); View.SendUserAction(idCommunity, idModule, idCall, ModuleCallForPaper.ActionType.ManageEvaluators); } else if (allowView) { View.RedirectToUrl(RootObject.ViewCalls(idCall, type, CallStandardAction.List, idCommunity, View.PreloadView)); } else { View.DisplayNoPermission(idCommunity, idModule); } } }
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 void InitView(CallForPaperType type, SearchRange range, Int32 idCommunity = -1) { if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else { LoadAvailableCall(type, range, idCommunity); } View.isInitialized = true; }
public void AddField(List <dtoCallSection <dtoCallField> > sections, dtoCallField field) { if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else { CallForPaperType type = View.CallType; long idCall = View.IdCall; Int32 idCommunity = View.IdCommunity; } }
public void InitView(CallForPaperType typeToLoad, Boolean fromPortal, List <Int32> fromCommunities, List <Int32> removeUsers) { View.RemoveUsers = removeUsers; if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else { LoadAvailableCall(typeToLoad, fromPortal, fromCommunities, removeUsers); } View.isInitialized = true; }
private void InitializeView(Boolean allowManage, long idCall, CallForPaperType type, dtoSubmissionFilters filters) { List <SubmissionFilterStatus> items = Service.GetAvailableSubmissionStatus(idCall); if (!items.Contains(filters.Status)) { filters.Status = items[0]; } filters.CallType = type; View.CurrentFilters = filters; View.LoadSubmissionStatus(items, filters.Status); LoadSubmissions(allowManage, idCall, type, filters, View.PreloadPageIndex, View.PreloadPageSize); }
private void LoadSubmissions(Boolean allowManage, long idCall, CallForPaperType type, dtoSubmissionFilters filters, int pageIndex, int pageSize) { PagerBase pager = new PagerBase(); pager.PageSize = pageSize; if (pageSize == 0) { pageSize = 50; } pager.Count = (int)Service.SubmissionsCount(idCall, filters) - 1; pager.PageIndex = pageIndex;// Me.View.CurrentPageIndex View.Pager = pager; View.CurrentOrderBy = filters.OrderBy; View.CurrentFilterBy = filters.Status; View.CurrentAscending = filters.Ascending; View.PageSize = pageSize; if (pager.Count < 0) { View.LoadNoSubmissionsFound(); } else { if (Service.CallIsAdvanced(idCall)) { View.IsAdvance = true; View.LoadSubmissions(Service.GetSubmissionListIntegration(allowManage, idCall, filters, pager.PageIndex, pageSize)); } else { View.IsAdvance = false; View.LoadSubmissions(Service.GetSubmissionList(allowManage, idCall, filters, pager.PageIndex, pageSize)); } } switch (type) { case CallForPaperType.CallForBids: View.SendUserAction(View.IdCallCommunity, View.IdCallModule, ModuleCallForPaper.ActionType.LoadSubmissionsList); break; case CallForPaperType.RequestForMembership: View.SendUserAction(View.IdCallCommunity, View.IdCallModule, ModuleRequestForMembership.ActionType.LoadSubmissionsList); break; } }
public static string PublicCollectorCalls(CallForPaperType type, long idCall, Int32 idCommunity) { String baseurl = "Modules/CallForPapers/Public{0}sCollector.aspx?"; switch (type) { case CallForPaperType.CallForBids: baseurl = String.Format(baseurl, "Call"); break; case CallForPaperType.RequestForMembership: baseurl = String.Format(baseurl, "Request"); break; } return(baseurl + "type=" + type.ToString() + "&idCommunity=" + idCommunity.ToString() + "#call_" + idCall.ToString()); }
public void InitView(CallForPaperType type, List <Int32> removeUsers, Boolean fromPortal, Int32 idCommunity, ModuleObject obj, long idTemplate, long idVersion, Boolean isTemplateCompliant, List <lm.Comol.Core.TemplateMessages.Domain.dtoTemplateTranslation> translations = null) { View.WasGridInitialized = false; View.RemoveUsers = removeUsers; View.CallType = type; View.LoadedNoUsers = false; if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else { InitializeFilters(type, removeUsers, fromPortal, idCommunity, obj, idTemplate, idVersion, isTemplateCompliant, translations); } View.isInitialized = true; }
public void LoadAvailableCall(CallForPaperType type, SearchRange range, Int32 idCommunity = -1) { View.CurrentIdItem = 0; View.AllowPreview = false; List <dtoCallToFind> items = Service.GetCallsForProfileInsert(type, range, idCommunity); View.AllowViewList = (items.Count > 1); if (items.Count == 1) { SelectCall(items[0].Id); } else { View.LoadCalls(items); } }
private static string BaseSubmitToCall(CallForPaperType type, long idCall, Boolean isPublic, Boolean fromPublicList, CallStatusForSubmitters view, Int32 containerIdCommunity) { String baseurl = "Modules/CallForPapers/" + ((isPublic) ? "Public" : ""); switch (type) { case CallForPaperType.CallForBids: baseurl += "SubmitCall.aspx?"; break; case CallForPaperType.RequestForMembership: baseurl += "SubmitRequest.aspx?"; break; } return(baseurl + "type=" + type.ToString() + "&View=" + view.ToString() + "&idCall=" + idCall.ToString() + ((fromPublicList == true) ? "&FromPublicList=true" : "") + ((containerIdCommunity > -1) ? "&idOtherCommunity=" + containerIdCommunity.ToString() :"")); }
public static string PreviewCall(CallForPaperType type, long idCall, int idCommunity, CallStatusForSubmitters view) { String url = "Modules/CallForPapers/"; switch (type) { case CallForPaperType.CallForBids: url += "PreviewCall.aspx?"; break; case CallForPaperType.RequestForMembership: url += "PreviewRequest.aspx?"; break; } url += "idCall=" + idCall.ToString() + "&idCommunity=" + idCommunity.ToString() + "&View=" + view.ToString(); return(url); }
public void PhisicalDeleteSubmission(long idSubmission, String baseFilePath, CallForPaperType type, dtoSubmissionFilters filters, int pageIndex, int pageSize) { if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else { Boolean allowManage = false; Int32 idCommunity = View.IdCallCommunity; switch (View.CallType) { case CallForPaperType.CallForBids: ModuleCallForPaper module = Service.CallForPaperServicePermission(UserContext.CurrentUserID, idCommunity); allowManage = (module.CreateCallForPaper || module.Administration || module.ManageCallForPapers || module.EditCallForPaper); break; case CallForPaperType.RequestForMembership: ModuleRequestForMembership moduleR = Service.RequestForMembershipServicePermission(UserContext.CurrentUserID, idCommunity); allowManage = (moduleR.CreateBaseForPaper || moduleR.Administration || moduleR.ManageBaseForPapers || moduleR.EditBaseForPaper); break; } if (allowManage) { Service.PhisicalDeleteSubmission(idSubmission, baseFilePath); switch (View.CallType) { case CallForPaperType.CallForBids: View.SendUserAction(View.IdCallCommunity, View.IdCallModule, idSubmission, ModuleCallForPaper.ActionType.VirtualDeleteSubmission); break; case CallForPaperType.RequestForMembership: View.SendUserAction(View.IdCallCommunity, View.IdCallModule, idSubmission, ModuleRequestForMembership.ActionType.VirtualDeleteSubmission); break; } View.GotoUrl(RootObject.ViewSubmissions(type, View.IdCall, 0, 0, View.PreloadView, filters.Status, filters.OrderBy, filters.Ascending, pageIndex, pageSize)); } else { LoadSubmissions(View.IdCallCommunity, type, filters, pageIndex, pageSize); } } }
public void LoadEvaluationsAdvance( long idCall, EvaluationType type, Int32 idCommunity, long idCommission, dtoEvaluationsFilters filters, int pageIndex, int pageSize, CallForPaperType CpType) { Boolean allowManage = true; View.CurrentFilters = filters; ModuleCallForPaper module = Service.CallForPaperServicePermission(UserContext.CurrentUserID, idCommunity); allowManage = (module.CreateCallForPaper || module.Administration || module.ManageCallForPapers || module.EditCallForPaper); bool IsPresident = ServiceCall.CommissionUserIsPresident(idCommission, UserContext.CurrentUserID); bool IsSecretary = ServiceCall.CommissionUserIsSecretary(idCommission, UserContext.CurrentUserID); allowManage |= IsPresident | IsSecretary; //E controllo sui membri della commissione! View.SetActionUrl((allowManage) ? CallStandardAction.Manage : CallStandardAction.List, RootObject.ViewCalls(idCall, CpType, ((allowManage) ? CallStandardAction.Manage : CallStandardAction.List), idCommunity, View.PreloadView)); if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else if (allowManage) { LoadItemsAdv(idCall, type, idCommunity, idCommission, filters, pageIndex, pageSize); } else { View.DisplayNoPermission(idCommunity, View.IdCallModule); } }
public void SaveSettings(String startMessage, String endMessage) { if (String.IsNullOrEmpty(startMessage) || string.IsNullOrEmpty(endMessage)) { View.DisplayInvalidMessage(); } else if (RequestService.SaveRequestMessages(View.IdCall, startMessage, endMessage)) { CallForPaperType type = View.CallType; long idCall = View.IdCall; View.LoadWizardSteps(View.IdCall, type, View.IdCommunity, RequestService.GetAvailableSteps(idCall, WizardCallStep.RequestMessages, type)); View.DisplaySaveErrors(false); } else { View.DisplaySaveErrors(true); } }
public void CloneField(List <dtoCallSection <dtoCallField> > sections, long idField) { long pIdSection = 0; long pIdField = 0; CallForPaperType type = View.CallType; long idCall = View.IdCall; Int32 idCommunity = View.IdCommunity; try { CallService.SaveSections(idCall, sections, View.TagCurrent); if (CallService.CloneField(idField, ref pIdSection, ref pIdField)) { if (View.CallType == CallForPaperType.CallForBids) { View.SendUserAction(idCommunity, View.IdCallModule, idCall, ModuleCallForPaper.ActionType.VirtualDeleteCallField); } else { View.SendUserAction(idCommunity, View.IdCallModule, idCall, ModuleRequestForMembership.ActionType.VirtualDeleteRequestField); } if (pIdField != 0) { View.ReloadEditor(RootObject.CallSubmissionEditorFieldRemoved(pIdField, type, idCall, idCommunity, View.PreloadView)); } else { View.ReloadEditor(RootObject.CallSubmissionEditorSectionRemoved(pIdSection, type, idCall, idCommunity, View.PreloadView)); } } else { View.DisplayError(EditorErrors.CloningField); } } catch (SubmissionLinked exSubmission) { View.DisplayError(EditorErrors.CloningField); } catch (Exception ex) { View.DisplayError(EditorErrors.CloningField); } }
public void VirtualDeleteSubmission(long idSubmission, Boolean delete, CallForPaperType type, dtoSubmissionFilters filters, int pageIndex, int pageSize) { if (UserContext.isAnonymous) { View.DisplaySessionTimeout(); } else { Service.VirtualDeleteSubmission(idSubmission, delete); switch (View.CallType) { case CallForPaperType.CallForBids: if (delete) { View.SendUserAction(View.IdCallCommunity, View.IdCallModule, idSubmission, ModuleCallForPaper.ActionType.VirtualDeleteSubmission); } else { View.SendUserAction(View.IdCallCommunity, View.IdCallModule, idSubmission, ModuleCallForPaper.ActionType.VirtualUndeleteSubmission); } break; case CallForPaperType.RequestForMembership: if (delete) { View.SendUserAction(View.IdCallCommunity, View.IdCallModule, idSubmission, ModuleRequestForMembership.ActionType.VirtualDeleteSubmission); } else { View.SendUserAction(View.IdCallCommunity, View.IdCallModule, idSubmission, ModuleRequestForMembership.ActionType.VirtualUndeleteSubmission); } break; } //LoadSubmissions(View.IdCallCommunity, type, filters, pageIndex, pageSize); View.GotoUrl(RootObject.ViewSubmissions(type, View.IdCall, 0, 0, View.PreloadView, filters.Status, filters.OrderBy, filters.Ascending, pageIndex, pageSize)); } }
private void InitializeViewAvance( long idCall, EvaluationType type, Int32 idCommunity, long idCommission, dtoEvaluationsFilters filters, CallForPaperType CpType ) { type = ServiceCall.CommissionGetEvalType(idCommission); List <EvaluationFilterStatus> items = Service.GetAvailableEvaluationFilterStatus(idCall); List <dtoSubmitterType> types = Service.GetSubmitterTypes(idCall, ManageEvaluationsAction.None); if (!items.Contains(filters.Status)) { filters.Status = items[0]; } if (types == null || (types != null && (!types.Any() && !types.Where(i => i.Id == filters.IdSubmitterType).Any()))) { filters.IdSubmitterType = -1; } View.CurrentFilters = filters; View.LoadAvailableStatus(items, filters.Status); View.LoadAvailableSubmitterTypes(types, filters.IdSubmitterType); LoadEvaluationsAdvance( idCall, type, idCommunity, idCommission, filters, View.PreloadPageIndex, View.PreloadPageSize, CpType); }
public void InitView(long idCall, CallForPaperType type, lm.Comol.Core.DomainModel.Repository.RepositoryAttachmentUploadActions action, lm.Comol.Core.FileRepository.Domain.RepositoryIdentifier identifier, lm.Comol.Core.FileRepository.Domain.ModuleRepository rPermissions = null) { if (!UserContext.isAnonymous) { View.CurrentAction = action; View.IdCall = idCall; View.CallType = type; View.IdCallCommunity = identifier.IdCommunity; switch (action) { case Core.DomainModel.Repository.RepositoryAttachmentUploadActions.uploadtomoduleitem: View.InitializeUploaderControl(action, identifier); break; } } else { View.CurrentAction = Core.DomainModel.Repository.RepositoryAttachmentUploadActions.none; } }