protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            SaveTaskPropertiesButton.Text = TheGlobalisationService.GetString("save_task_properties");

            var taskType = Request["AssemblyQualifiedTypeName"];
            var task     = TheTaskFactory.CreateTask(taskType);

            var queryItems = Request.QueryString.Keys.Cast <string>().ToDictionary <string, string, object>(queryStringKey => queryStringKey, queryStringKey => Request.QueryString[queryStringKey]);

            if (queryItems.ContainsKey("Id"))
            {
                queryItems["Id"] = new Guid((string)queryItems["Id"]);
            }

            TheHelper.SetProperties(task, queryItems);

            _ui = TheWorkflowEntityUiResolver.Resolve(task);

            foreach (var c in _ui.Render(task))
            {
                TaskPropertiesUiPanel.Controls.Add(c);
            }
        }
Exemplo n.º 2
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            var id = Convert.ToInt32(Request["id"]);

            _config = TheWorkflowConfigurationService.GetConfiguration(id);
            _ui     = TheWorkflowEntityUiResolver.Resolve(_config);

            foreach (var control in _ui.Render(_config))
            {
                PropertiesUiPanel.Controls.Add(control);
            }
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            SaveCriteriaButton.Text = TheGlobalisationService.GetString("save_criteria");

            var criteriaId = Convert.ToInt32(Request["id"]);

            _instantiationCriteria = TheWorkflowInstantiationCriteriaService.GetCriteria(criteriaId);
            _entityUi = TheWorkflowEntityUiResolver.Resolve(_instantiationCriteria);

            foreach (var control in _entityUi.Render(_instantiationCriteria))
            {
                CiteriaControlsPanel.Controls.Add(control);
            }
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            var taskType = Request["AssemblyQualifiedTypeName"];
            var task     = TheTaskFactory.CreateTask(taskType);

            var queryItems = new Dictionary <string, object>();

            foreach (string key in Request.QueryString.Keys)
            {
                if (key.Contains("[]"))
                {
                    var dictKey = key.Replace("[]", "");
                    var items   = Request.QueryString[key].Split(',');

                    try
                    {
                        queryItems.Add(dictKey, items.ToList().ConvertAll(Convert.ToInt32));
                    } catch
                    {
                        queryItems.Add(dictKey, items.ToList().ConvertAll(Convert.ToString));
                    }
                }
                else
                {
                    queryItems.Add(key, Request.QueryString[key]);
                }
            }

            if (queryItems.ContainsKey("Id"))
            {
                queryItems["Id"] = new Guid((string)queryItems["Id"]);
            }

            TheHelper.SetProperties(task, queryItems);
            _ui = TheWorkflowEntityUiResolver.Resolve(task);

            foreach (var c in _ui.Render(task))
            {
                TaskPropertiesUiPanel.Controls.Add(c);
            }
        }
Exemplo n.º 5
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            SavePropertiesButton.Text = TheGlobalisationService.GetString("save_properties");

            this.AddResourceToClientDependency("Moriyama.Workflow.Umbraco6.Web.Workflow.Js.Util.js", ClientDependencyType.Javascript);
            this.AddResourceToClientDependency("Moriyama.Workflow.Umbraco6.Web.Workflow.Js.Config.js", ClientDependencyType.Javascript);

            var id = Convert.ToInt32(Request["id"]);

            _config = TheWorkflowConfigurationService.GetConfiguration(id);
            _ui     = TheWorkflowEntityUiResolver.Resolve(_config);

            foreach (var control in _ui.Render(_config))
            {
                PropertiesUiPanel.Controls.Add(control);
            }
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            SavePropertiesButton.Text = TheGlobalisationService.GetString("save_properties");

            this.AddResourceToClientDependency("Moriyama.Workflow.Umbraco6.Web.Workflow.Js.Util.js", ClientDependencyType.Javascript);
            this.AddResourceToClientDependency("Moriyama.Workflow.Umbraco6.Web.Workflow.Js.Config.js", ClientDependencyType.Javascript);

            var id = Convert.ToInt32(Request["id"]);

            _config = TheWorkflowConfigurationService.GetConfiguration(id);
            _ui = TheWorkflowEntityUiResolver.Resolve(_config);

            foreach (var control in _ui.Render(_config))
            {
                PropertiesUiPanel.Controls.Add(control);
            }
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            
            var taskType = Request["AssemblyQualifiedTypeName"];
            var task = TheTaskFactory.CreateTask(taskType);

            var queryItems = new Dictionary<string, object>();
            foreach(string key in Request.QueryString.Keys)
            {
                if (key.Contains("[]"))
                {
                    var dictKey = key.Replace("[]", "");
                    var items = Request.QueryString[key].Split(',');

                    try
                    {
                        queryItems.Add(dictKey, items.ToList().ConvertAll(Convert.ToInt32));
                    } catch
                    {
                        queryItems.Add(dictKey, items.ToList().ConvertAll(Convert.ToString));
                    }

                } else
                {
                    queryItems.Add(key, Request.QueryString[key]);
                }
            }
            
            if (queryItems.ContainsKey("Id"))
            {
                queryItems["Id"] = new Guid((string)queryItems["Id"]);
            }
                  
            TheHelper.SetProperties(task, queryItems);
            _ui = TheWorkflowEntityUiResolver.Resolve(task);

            foreach (var c in _ui.Render(task))
            {
                TaskPropertiesUiPanel.Controls.Add(c);
            }
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            SaveCriteriaButton.Text = TheGlobalisationService.GetString("save_criteria");

            var criteriaId = Convert.ToInt32(Request["id"]);
            _instantiationCriteria = TheWorkflowInstantiationCriteriaService.GetCriteria(criteriaId);

            Log.Debug(string.Format("Got criteria of type {0}", _instantiationCriteria.GetType()));

            _entityUi = TheWorkflowEntityUiResolver.Resolve(_instantiationCriteria);

            // if (IsPostBack) return;

            foreach (var control in _entityUi.Render(_instantiationCriteria))
            {
                CiteriaControlsPanel.Controls.Add(control);
            }
        }
Exemplo n.º 9
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            SaveCriteriaButton.Text = TheGlobalisationService.GetString("save_criteria");

            var criteriaId = Convert.ToInt32(Request["id"]);

            _instantiationCriteria = TheWorkflowInstantiationCriteriaService.GetCriteria(criteriaId);

            Log.Debug(string.Format("Got criteria of type {0}", _instantiationCriteria.GetType()));

            _entityUi = TheWorkflowEntityUiResolver.Resolve(_instantiationCriteria);

            // if (IsPostBack) return;

            foreach (var control in _entityUi.Render(_instantiationCriteria))
            {
                CiteriaControlsPanel.Controls.Add(control);
            }
        }