Пример #1
0
 private void RegisterXafCallackHandler()
 {
     if (XafCallbackManager != null)
     {
         XafCallbackManager.RegisterHandler("KA18958", this);
     }
 }
 private void RegisterXafCallackHandler()
 {
     if (XafCallbackManager != null)
     {
         XafCallbackManager.RegisterHandler("T171941", this);
         XafCallbackManager.RegisterHandler("T171942", this);
     }
 }
 private void RegisterXafCallackHandler()
 {
     if (XafCallbackManager != null)
     {
         var AllScripts = this.ObjectSpace.GetObjects <ScriptObject>();
         foreach (var item in AllScripts)
         {
             XafCallbackManager.RegisterHandler(item.Name, this);
         }
     }
 }
Пример #4
0
        protected override void OnViewControlsCreated()
        {
            base.OnViewControlsCreated();
            var gridListEditor = View.Editor as ASPxGridListEditor;

            if (gridListEditor != null && ((IModelListViewColumnChooserContextMenu)View.Model).ColumnChooserContextMenu)
            {
                XafCallbackManager.RegisterHandler(GetType().FullName, this);
                gridListEditor.Grid.FillContextMenuItems += GridOnFillContextMenuItems;
                var    script = XafCallbackManager.GetScript(GetType().FullName, "");
                string check  = "if (e.item.name == '" + ColumnChooserAction.Id + "') ";
                gridListEditor.Grid.ClientSideEvents.ContextMenuItemClick = $@"function(s, e){{{check}{script}}}";
            }
        }
Пример #5
0
        protected override void OnViewControlsCreated()
        {
            base.OnViewControlsCreated();
            if (((IModelListViewEventCreation)View.Model).CreateEventOnDoubleClick)
            {
                ASPxSchedulerListEditor editor = View.Editor as ASPxSchedulerListEditor;
                if (editor != null)
                {
                    XafCallbackManager.RegisterHandler("ASPxSchedulerEventCreationController", this);
                    editor.SchedulerControl.ClientSideEvents.Init = @"function(s,e) {
s.GetMainElement().ondblclick = function() { " + XafCallbackManager.GetScript("ASPxSchedulerEventCreationController", "") +
                                                                    @" }
}";
                }
            }
        }
Пример #6
0
        protected override void OnViewControlsCreated()
        {
            base.OnViewControlsCreated();
            XafCallbackManager callbackManager = ((ICallbackManagerHolder)WebWindow.CurrentRequestPage).CallbackManager;

            callbackManager.RegisterHandler(GetType().FullName, this);
            foreach (var action in Frame.Actions <SimpleAction>())
            {
                var modelActionClientScript = ((IModelActionClientScript)action.Model());
                if (!string.IsNullOrEmpty(modelActionClientScript?.ConfirmationMsg))
                {
                    var clientScript = callbackManager.GetScript(GetType().FullName, "ret +';" + action.Id + "'");
                    modelActionClientScript.Script = "var ret= confirm('" + modelActionClientScript.ConfirmationMsg + "'); " + clientScript;
                }
            }
        }
Пример #7
0
        private void CustomizeDashboardViewer(ASPxDashboard dashboardControl)
        {
            XafCallbackManager callbackManager = ((ICallbackManagerHolder)WebWindow.CurrentRequestPage).CallbackManager;

            callbackManager.RegisterHandler(HandlerName, this);
            string widgetScript = @"function getOid(s, e) {{
                                        function findMeasure(measure) {{
                                            return measure.DataMember === 'Oid';
                                        }}
                                        if (e.ItemName.includes('gridDashboardItem')) {{
                                             var itemData = e.GetData(),
                                                dataSlice = itemData.GetSlice(e.GetAxisPoint()),
                                                oidMeasure = dataSlice.GetMeasures().find(findMeasure).Id,
                                                measureValue = dataSlice.GetMeasureValue(oidMeasure);
                                                {0}
                                        }}
                                    }}";

            dashboardControl.ClientSideEvents.ItemClick = string.Format(widgetScript, callbackManager.GetScript(HandlerName, "measureValue.GetValue()"));
        }
Пример #8
0
        void Frame_TemplateChanged(object sender, EventArgs e)
        {
            XafCallbackManager callbackManager = ((ICallbackManagerHolder)WebWindow.CurrentRequestPage).CallbackManager;

            callbackManager.RegisterHandler("ShowViewWindowController", this);
        }
Пример #9
0
 public void Register(String ID)
 {
     XafCallbackManager.RegisterHandler(ID, this);
     CallbackID = ID;
 }
Пример #10
0
 protected override void OnViewControlsCreated()
 {
     base.OnViewControlsCreated();
     XafCallbackManager.RegisterHandler("ViewController1", this);
 }
Пример #11
0
 public virtual void RegisterHandler()
 {
     XafCallbackManager.RegisterHandler(control.ClientID, this);
 }