/// <summary>
 /// Create the control representing the picklist.
 /// </summary>
 /// <param name="parentControl"></param>
 public void CreateChildControls(SimplePicklist parentControl)
 {
     _picklist = new PickListControl();
     if ((_storageMode & PicklistStorageMode.Id) != 0)
     {
         _picklist.StorageMode = Sage.Platform.Controls.StorageModeEnum.ID;
     }
     else if ((_storageMode & PicklistStorageMode.Code) != 0)
     {
         _picklist.StorageMode = Sage.Platform.Controls.StorageModeEnum.Code;
     }
     _picklist.PickListName   = _picklistName;
     _picklist.AllowMultiples = _attr.AllowMultiples;
     _picklist.AlphaSort      = _attr.AlphaSorted;
     _picklist.NoneEditable   = _attr.NoneEditable;
     // do not set this attribute - the default validator created is too limited
     //_picklist.Required = _attr.Required;
     _picklist.MustExistInList       = _attr.ValueMustExist;
     _picklist.PickListValueChanged += delegate
     {
         if (TextChanged != null)
         {
             TextChanged(this, EventArgs.Empty);
         }
     };
     _picklist.AutoPostBack = parentControl.AutoPostBack;
     parentControl.Controls.Add(_picklist);
 }
Example #2
0
        protected void InsertPhrase(RichTextBox rtb, string phraseCategory)
        {
            string phrase = PickListControl.ShowPickList(User, PickListType.Phrase, phraseCategory, TraitCategoryType.Taxon);

            if (phrase != null)
            {
                var tr = new TextRange(rtb.Selection.Start, rtb.Selection.End);
                tr.Text = phrase;
                rtb.Focus();
            }
        }
    private void CompleteActivity(DateTime completeDate, bool selectedContact)
    {
        UpdateContactOrLeadInfo(selectedContact);

        PickListControl pklResult  = FindCompActControl("Result") as PickListControl;
        string          result     = (pklResult != null) ? pklResult.PickListValue : string.Empty;
        string          resultCode = string.Empty;
        IHistory        hist       = Activity.Complete(CurrentUserId, result, resultCode, completeDate);

        UpdateActivityAttachments(hist);
        UpdateEntityHistory(hist);
        LinkToNextDialog(hist);
    }
 /// <summary>
 /// Create the control representing the picklist.
 /// </summary>
 /// <param name="parentControl"></param>
 public void CreateChildControls(SimplePicklist parentControl)
 {
     _picklist = new PickListControl();
     if ((_storageMode & PicklistStorageMode.Id) != 0)
         _picklist.StorageMode = Sage.Platform.Controls.StorageModeEnum.ID;
     else if ((_storageMode & PicklistStorageMode.Code) != 0)
         _picklist.StorageMode = Sage.Platform.Controls.StorageModeEnum.Code;
     _picklist.PickListName = _picklistName;
     _picklist.AllowMultiples = _attr.AllowMultiples;
     _picklist.AlphaSort = _attr.AlphaSorted;
     _picklist.NoneEditable = _attr.NoneEditable;
     // do not set this attribute - the default validator created is too limited
     //_picklist.Required = _attr.Required;
     _picklist.MustExistInList = _attr.ValueMustExist;
     _picklist.PickListValueChanged += delegate
     {
         if (TextChanged != null)
             TextChanged(this, EventArgs.Empty);
     };
     _picklist.AutoPostBack = parentControl.AutoPostBack;
     parentControl.Controls.Add(_picklist);
 }