Пример #1
0
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            Title = "Шаблоны процессов - LeadForce";

            radAjaxManager = RadAjaxManager.GetCurrent(Page);

            radAjaxManager.AjaxSettings.AddAjaxSetting(InPlansAndActive, gridWorkflowTemplates, null, UpdatePanelRenderMode.Inline);
            radAjaxManager.AjaxSettings.AddAjaxSetting(InPlans, gridWorkflowTemplates, null, UpdatePanelRenderMode.Inline);
            radAjaxManager.AjaxSettings.AddAjaxSetting(Active, gridWorkflowTemplates, null, UpdatePanelRenderMode.Inline);
            radAjaxManager.AjaxSettings.AddAjaxSetting(Archive, gridWorkflowTemplates, null, UpdatePanelRenderMode.Inline);
            radAjaxManager.AjaxSettings.AddAjaxSetting(All, gridWorkflowTemplates, null, UpdatePanelRenderMode.Inline);

            rbAddWorkflowTemplate.NavigateUrl = UrlsData.AP_WorkflowTemplateAdd();
            rbAddWithMaster.NavigateUrl       = UrlsData.AP_WorkflowTemplateWizard();
            gridWorkflowTemplates.SiteID      = SiteId;
            gridWorkflowTemplates.Where.Add(new GridWhere {
                CustomQuery = string.Format("((tbl_WorkflowTemplate.Status=0 OR tbl_WorkflowTemplate.Status=1) AND DataBaseStatusID = {0})", (int)DataBaseStatus.Active)
            });

            var optionTagPanel = ((LeadForceBasePage)Page).CurrentModuleEditionOptions.SingleOrDefault(a => a.SystemName == "TagAndFiltersPanel");

            if (optionTagPanel == null && !((LeadForceBasePage)Page).IsDefaultEdition)
            {
                gridWorkflowTemplates.ShowSelectCheckboxes = false;
                RadPanelBar1.Items[0].Visible = false;
                RadPanelBar1.Items[1].Visible = false;
            }

            var allowWorkflowDesignerOption = ((LeadForceBasePage)Page).CurrentModuleEditionOptions.SingleOrDefault(a => a.SystemName == "AllowWorkflowDesigner");

            if (allowWorkflowDesignerOption == null && !((LeadForceBasePage)Page).IsDefaultEdition)
            {
                rbAddWorkflowTemplate.Visible = false;
                allowWorkflowDesigner         = false;
            }

            //gridWorkflowTemplates.Actions.Add(new GridAction { Text = "Карточка шаблона процесса", NavigateUrl = string.Format("~/{0}/WorkflowTemplates/Edit/{{0}}", CurrentTab), ImageUrl = "~/App_Themes/Default/images/icoView.png" });
        }