/// <summary>
 /// Called by our controller to control the types of fields which are to be displayed
 /// </summary>
 /// <param name="newScope"></param>
 public void SelectDisplayFields(UserDataCategory.SCOPE newScope)
 {
     if (_currentScope == newScope)
     {
         return;
     }
     _currentScope = newScope;
     RefreshTab();
 }
Beispiel #2
0
 /// <summary>
 /// Copy constructor
 /// </summary>
 /// <param name="other"></param>
 public UserDataField(UserDataField other)
 {
     _fieldID     = other._fieldID;
     _name        = other._name;
     _parentID    = other._parentID;
     _isMandatory = other._isMandatory;
     _type        = other._type;
     _value1      = other._value1;
     _value2      = other._value2;
     _tabOrder    = other._tabOrder;
     _parentScope = other._parentScope;
 }
Beispiel #3
0
 public UserDataField(DataRow dataRow)
     : this()
 {
     try
     {
         _fieldID     = (int)dataRow["_USERDEFID"];
         _name        = (string)dataRow["_NAME"];
         _parentID    = (int)dataRow["_PARENTID"];
         _isMandatory = (bool)dataRow["_ISMANDATORY"];
         _type        = (FieldType)dataRow["_TYPE"];
         _value1      = (string)dataRow["_VALUE1"];
         _value2      = (string)dataRow["_VALUE2"];
         _tabOrder    = (int)dataRow["_TABORDER"];
         _parentScope = (UserDataCategory.SCOPE)dataRow["_SCOPE"];
     }
     catch (Exception ex)
     {
         logger.Error(ex.Message);
         Utility.DisplayErrorMessage("Exception occurred creating a USERDATAFIELD Object, please check database schema.  The message was " + ex.Message);
     }
 }
Beispiel #4
0
        public UserDataField()
        {
            try
            {
                _fieldID     = 0;
                _name        = "";
                _parentID    = 0;
                _isMandatory = false;
                _type        = FieldType.Text;
                _value1      = "";
                _value2      = "";
                _tabOrder    = 0;
                _parentScope = UserDataCategory.SCOPE.Asset;

                // Initialize the field types dictionary
                _fieldTypes.Clear();
                _fieldTypes.Add(FieldType.Text, "Text");
                _fieldTypes.Add(FieldType.Number, "Numeric");
                _fieldTypes.Add(FieldType.Picklist, "PickList");
                //_fieldTypes.Add(FieldType.boolean, "Boolean");
                _fieldTypes.Add(FieldType.Environment, "Environment Variable");
                _fieldTypes.Add(FieldType.Registry, "Registry Key");
                _fieldTypes.Add(FieldType.Date, "Date");
                _fieldTypes.Add(FieldType.Currency, "Currency");
                //
                _fieldCase.Clear();
                _fieldCase.Add(FieldCase.Any, "any");
                _fieldCase.Add(FieldCase.Lower, "lower");
                _fieldCase.Add(FieldCase.Title, "TitleCase");
                _fieldCase.Add(FieldCase.Upper, "UPPER");
                //
                _listCurrentValues.Clear();
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
            }
        }
Beispiel #5
0
 public UserDataCategoryList(UserDataCategory.SCOPE scope)
 {
     _scope = scope;
 }