using System; using System.Web.UI.WebControls; using CMS.FormControls; using CMS.GlobalHelper; using CMS.UIControls; public partial class CMSModules_Automation_FormControls_AutomationProcessSelector : FormEngineUserControl { #region "Public properties" /// /// Gets selected Process ID. /// public int ProcessID { get { return ValidationHelper.GetInteger(Value, 0); } } /// /// Returns Uniselector. /// public UniSelector UniSelector { get { EnsureChildControls(); return uniSelector; } } /// /// Gets or sets field value. /// public override object Value { get { EnsureChildControls(); return uniSelector.Value; } set { EnsureChildControls(); uniSelector.Value = ValidationHelper.GetString(value, ""); } } /// /// SQL WHERE condition of uniselector. /// public string WhereCondition { get; set; } /// /// Gets or sets if control is placed in sitemanager. /// public bool IsSiteManager { get { return uniSelector.IsSiteManager; } set { uniSelector.IsSiteManager = value; } } /// /// Gets or sets if uniselector is enabled. /// public override bool Enabled { get { return uniSelector.Enabled; } set { base.Enabled = value; uniSelector.Enabled = value; } } #endregion #region "Methods" protected void Page_Load(object sender, EventArgs e) { if (StopProcessing) { uniSelector.StopProcessing = true; } else { ReloadData(); } } /// /// Reloads the data in the selector. /// public void ReloadData() { uniSelector.Reload(true); } #endregion }