コード例 #1
0
ファイル: TagEditPortlet.cs プロジェクト: kimduquan/DMIS
 protected override void OnCommandButtons(CommandButtonsEventArgs e)
 {
     switch (e.ButtonType)
     {
     case CommandButtonType.CheckoutSave:
     case CommandButtonType.CheckoutSaveCheckin:
     case CommandButtonType.Publish:
     case CommandButtonType.Save:
     case CommandButtonType.SaveCheckin:
         e.Cancel = true;
         this.HandleTagReplacement(e.ContentView);
         break;
     }
 }
コード例 #2
0
 protected void _contentView_CommandButtonsAction(object sender, CommandButtonsEventArgs e)
 {
     if (e.ButtonType == CommandButtonType.Save || e.ButtonType == CommandButtonType.SaveCheckin || e.ButtonType == CommandButtonType.CheckoutSaveCheckin || e.ButtonType == CommandButtonType.CheckoutSave)
     {
         HandleSave(e.ContentView);
     }
     else if (e.ButtonType == CommandButtonType.Cancel)
     {
         HandleCancel();
     }
     else
     {
         this._recreateNewContentView  = false;
         this._recreateEditContentView = false;
         _container.Controls.Clear();
     }
 }
コード例 #3
0
        protected void ContentView_CommandButtonsAction(object sender, CommandButtonsEventArgs e)
        {
            if (e.ButtonType == CommandButtonType.Cancel)
            {
                return;
            }

            e.ContentView.UpdateContent();

            var cic = e.ContentView.Content["CheckInComments"] as string;
            var gc  = e.ContentView.ContentHandler as GenericContent;

            if (gc == null || (gc.CheckInCommentsMode == CheckInCommentsMode.Compulsory && string.IsNullOrEmpty(cic)))
            {
                e.ContentView.ContentException = new Exception(HttpContext.GetGlobalResourceObject("Portal", "CheckInCommentsCompulsory") as string);
                e.Cancel = true;
            }
        }
コード例 #4
0
 protected virtual void OnCommandButtons(CommandButtonsEventArgs e)
 {
 }
コード例 #5
0
 protected void contentView_CommandButtonsAction(object sender, CommandButtonsEventArgs e)
 {
     this.OnCommandButtons(e);
 }