public bool NASCustomFieldTypeStringControlDataEditingState_PreTransitionCRUD(string transition)
 {
     if (transition.ToUpper()
         .Equals(NASCustomFieldTypeControlStateTransition.UpdateTransition.TransitionName))
     {
         //Update data of custom field by ObjectCustomFieldId
         CustomFieldDataStringBO customFieldDataStringBO = new CustomFieldDataStringBO();
         string stringValue = txtStringValueEditing.Text;
         if (customFieldDataStringBO.UpdateCustomFieldData(ObjectCustomFieldId, stringValue))
         {
             if (DataUpdated != null)
             {
                 ObjectCustomField objectCustomField =
                     session.GetObjectByKey <ObjectCustomField>(ObjectCustomFieldId);
                 //Raise DataUpdated event
                 DataUpdated(this,
                             new CustomFieldControlEventArgs(
                                 ObjectCustomFieldId,
                                 objectCustomField.ObjectTypeCustomFieldId.ObjectTypeCustomFieldId,
                                 objectCustomField.ObjectId.ObjectId,
                                 objectCustomField.ObjectTypeCustomFieldId.CustomFieldId.CustomFieldId,
                                 CustomFieldControlEventArgs.CustomFieldCategoryEnum.BASIC,
                                 stringValue,
                                 BasicCustomFieldTypeEnum.STRING,
                                 null,
                                 null));
             }
         }
     }
     return(true);
 }
        public bool NASCustomFieldTypeStringControlDataEditingState_CRUD()
        {
            //Get data of custom field by ObjectCustomFieldId in ObjectCustomField table
            CustomFieldDataStringBO customFieldDataStringBO = new CustomFieldDataStringBO();
            CustomFieldDataString   customFieldDataString   =
                customFieldDataStringBO.GetCustomFieldData(session, ObjectCustomFieldId);

            //Set data to GUI
            txtStringValueEditing.Text = customFieldDataString.StringValue;
            txtStringValueEditing.Focus();
            return(true);
        }
        public bool NASCustomFieldTypeStringControlDataViewingState_CRUD()
        {
            //Get data of custom field by ObjectCustomFieldId in ObjectCustomField table
            CustomFieldDataStringBO customFieldDataStringBO = new CustomFieldDataStringBO();
            CustomFieldDataString   customFieldDataString   =
                customFieldDataStringBO.GetCustomFieldData(session, ObjectCustomFieldId);
            //Set data to GUI
            string linkText = customFieldDataString.StringValue.Equals(String.Empty) ?
                              "Chỉnh sửa" : customFieldDataString.StringValue;

            hyperlinkStringDataViewing.Text = linkText;
            return(true);
        }