コード例 #1
0
 public void AddSection(List <dtoCallSection <dtoCallField> > sections, String name, String description)
 {
     if (UserContext.isAnonymous)
     {
         View.DisplaySessionTimeout();
     }
     else
     {
         CallForPaperType type        = View.CallType;
         long             idCall      = View.IdCall;
         Int32            idCommunity = View.IdCommunity;
         FieldsSection    section     = CallService.AddSectionToCall(idCall, sections, name, description);
         if (section == null)
         {
             View.DisplayError(EditorErrors.AddingSection);
         }
         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));
         }
     }
 }