Esempio n. 1
0
        private void openSchemaObjectDesigner(string schemaObjectID, string mode = "edit")
        {
            foreach (var win in AppServer.CurrentAppNavBarModel.ChromeWindows.Values)
            {
                if (!string.IsNullOrEmpty(win.ModelBindingId))
                {
                    var model = AppServer.BindingModelList[win.ModelBindingId];
                    if (model is BaseEditFormModel && win.RecordId == schemaObjectID)
                    {
                        win.SetFocused();
                        return;
                    }
                }
            }

            var obj = App.Schema.GetObject<SchemaObject>(Guid.Parse(schemaObjectID));

            var action = new OpenChildWindowAction();
            action.Url = obj.GetDesignerUrl()+ "?ID=" + schemaObjectID + "&mode=" + mode;
            ExecuteJavaScript(action.GetJsCode());
        }
Esempio n. 2
0
        public void OpenSchemaDesigner(dynamic args)
        {
            foreach (var win in ChromeWindows.Values)
            {
                if (!string.IsNullOrEmpty(win.ModelBindingId))
                {
                    var model = AppServer.BindingModelList[win.ModelBindingId];
                    if (model is SchemaDesignerModel)
                    {
                        win.SetFocused();
                        return;
                    }
                }
            }

            var action = new OpenChildWindowAction();
            action.Url = "/Buhta/SchemaDesigner";
            ExecuteJavaScript(action.GetJsCode());
        }