/// <summary> /// This method finds a 'UIField' object. /// This method uses the 'UIField_Find' procedure. /// </summary> /// <returns>A 'UIField' object.</returns> /// </summary> public UIField FindUIField(FindUIFieldStoredProcedure findUIFieldProc, DataConnector databaseConnector) { // Initial Value UIField uIField = null; // Verify database connection is connected if ((databaseConnector != null) && (databaseConnector.Connected)) { // First Get Dataset DataSet uIFieldDataSet = this.DataHelper.LoadDataSet(findUIFieldProc, databaseConnector); // Verify DataSet Exists if (uIFieldDataSet != null) { // Get DataTable From DataSet DataRow row = this.DataHelper.ReturnFirstRow(uIFieldDataSet); // if row exists if (row != null) { // Load UIField uIField = UIFieldReader.Load(row); } } } // return value return(uIField); }
public async Task <ServiceExecutionResult> SignInTask() { var loginField = new UIField("Username"); var passwField = new UIField("Password"); passwField.HideChars = true; var inputFields = new List <UIField>(); inputFields.Add(loginField); inputFields.Add(passwField); if (uiService.SingleThreaded) { while (this.status != ServiceExecutionStatus.Completed) { uiService.WaitUserInput(inputFields, new Action(Authenticate)); } } else { uiService.WaitUserInput(inputFields, new Action(Authenticate)); await MonitorServiceStatus(); } return(this.result); }
/// <summary> /// Saves a 'UIField' object into the database. /// This method calls the 'Insert' or 'Update' method. /// </summary> /// <param name='uIField'>The 'UIField' object to save.</param> /// <returns>True if successful or false if not.</returns> public bool Save(ref UIField uIField) { // Initial value bool saved = false; // If the uIField exists. if (uIField != null) { // Is this a new UIField if (uIField.IsNew) { // Insert new UIField int newIdentity = this.Insert(uIField); // if insert was successful if (newIdentity > 0) { // Update Identity uIField.UpdateIdentity(newIdentity); // Set return value saved = true; } } else { // Update UIField saved = this.Update(uIField); } } // return value return(saved); }
private void OnStartEditField(UIField f) { if (textComponent != null) { textComponent.text = "..."; } }
private void OnEndEditField(UIField f) { if (f == CurrentField) { UpdateInputComponent(); } }
private static FlowLayoutWidget CreateSettingsRow(EditableProperty property, UIField field) { var row = CreateSettingsRow(property.DisplayName.Localize(), property.Description.Localize()); row.AddChild(field.Content); return(row); }
private void OnPressAddItemButton() { if (CurrentField != null && CurrentField is UIArrayField) { UIField newField = (CurrentField as UIArrayField).AddField(); AddItemBuilder(newField, true); } }
/// <summary> /// This method deletes a 'UIField' object. /// </summary> /// <param name='List<PolymorphicObject>'>The 'UIField' to delete. /// <returns>A PolymorphicObject object with a Boolean value. internal PolymorphicObject DeleteUIField(List <PolymorphicObject> parameters, DataConnector dataConnector) { // Initial Value PolymorphicObject returnObject = new PolymorphicObject(); // If the data connection is connected if ((dataConnector != null) && (dataConnector.Connected == true)) { // Create Delete StoredProcedure DeleteUIFieldStoredProcedure deleteUIFieldProc = null; // verify the first parameters is a(n) 'UIField'. if (parameters[0].ObjectValue as UIField != null) { // Create UIField UIField uIField = (UIField)parameters[0].ObjectValue; // verify uIField exists if (uIField != null) { // Now create deleteUIFieldProc from UIFieldWriter // The DataWriter converts the 'UIField' // to the SqlParameter[] array needed to delete a 'UIField'. deleteUIFieldProc = UIFieldWriter.CreateDeleteUIFieldStoredProcedure(uIField); } } // Verify deleteUIFieldProc exists if (deleteUIFieldProc != null) { // Execute Delete Stored Procedure bool deleted = this.DataManager.UIFieldManager.DeleteUIField(deleteUIFieldProc, dataConnector); // Create returnObject.Boolean returnObject.Boolean = new NullableBoolean(); // If delete was successful if (deleted) { // Set returnObject.Boolean.Value to true returnObject.Boolean.Value = NullableBooleanEnum.True; } else { // Set returnObject.Boolean.Value to false returnObject.Boolean.Value = NullableBooleanEnum.False; } } } else { // Raise Error Data Connection Not Available throw new Exception("The database connection is not available."); } // return value return(returnObject); }
/// <summary> /// This method finds a 'UIField' object. /// </summary> /// <param name='List<PolymorphicObject>'>The 'UIField' to delete. /// <returns>A PolymorphicObject object with a Boolean value. internal PolymorphicObject FindUIField(List <PolymorphicObject> parameters, DataConnector dataConnector) { // Initial Value PolymorphicObject returnObject = new PolymorphicObject(); // locals UIField uIField = null; // If the data connection is connected if ((dataConnector != null) && (dataConnector.Connected == true)) { // Create Find StoredProcedure FindUIFieldStoredProcedure findUIFieldProc = null; // verify the first parameters is a 'UIField'. if (parameters[0].ObjectValue as UIField != null) { // Get UIFieldParameter UIField paramUIField = (UIField)parameters[0].ObjectValue; // verify paramUIField exists if (paramUIField != null) { // Now create findUIFieldProc from UIFieldWriter // The DataWriter converts the 'UIField' // to the SqlParameter[] array needed to find a 'UIField'. findUIFieldProc = UIFieldWriter.CreateFindUIFieldStoredProcedure(paramUIField); } // Verify findUIFieldProc exists if (findUIFieldProc != null) { // Execute Find Stored Procedure uIField = this.DataManager.UIFieldManager.FindUIField(findUIFieldProc, dataConnector); // if dataObject exists if (uIField != null) { // set returnObject.ObjectValue returnObject.ObjectValue = uIField; } } } else { // Raise Error Data Connection Not Available throw new Exception("The database connection is not available."); } } // return value return(returnObject); }
private static FlowLayoutWidget CreateSettingsColumn(string labelText, UIField field, string toolTipText = null) { var column = CreateSettingsColumn(labelText, toolTipText); var row = new FlowLayoutWidget() { HAnchor = HAnchor.Stretch }; row.AddChild(new HorizontalSpacer()); row.AddChild(field.Content); column.AddChild(row); return(column); }
/// <summary> /// This method fetches all 'UIField' objects. /// </summary> /// <param name='List<PolymorphicObject>'>The 'UIField' to delete. /// <returns>A PolymorphicObject object with all 'UIFields' objects. internal PolymorphicObject FetchAll(List <PolymorphicObject> parameters, DataConnector dataConnector) { // Initial Value PolymorphicObject returnObject = new PolymorphicObject(); // locals List <UIField> uIFieldListCollection = null; // Create FetchAll StoredProcedure FetchAllUIFieldsStoredProcedure fetchAllProc = null; // If the data connection is connected if ((dataConnector != null) && (dataConnector.Connected == true)) { // Get UIFieldParameter // Declare Parameter UIField paramUIField = null; // verify the first parameters is a(n) 'UIField'. if (parameters[0].ObjectValue as UIField != null) { // Get UIFieldParameter paramUIField = (UIField)parameters[0].ObjectValue; } // Now create FetchAllUIFieldsProc from UIFieldWriter fetchAllProc = UIFieldWriter.CreateFetchAllUIFieldsStoredProcedure(paramUIField); } // Verify fetchAllProc exists if (fetchAllProc != null) { // Execute FetchAll Stored Procedure uIFieldListCollection = this.DataManager.UIFieldManager.FetchAllUIFields(fetchAllProc, dataConnector); // if dataObjectCollection exists if (uIFieldListCollection != null) { // set returnObject.ObjectValue returnObject.ObjectValue = uIFieldListCollection; } } else { // Raise Error Data Connection Not Available throw new Exception("The database connection is not available."); } // return value return(returnObject); }
public override UIField BusinessToUI(BUSField businessEntity) { UIField UIEntity = base.BusinessToUI(businessEntity); UIEntity.JoinName = businessEntity.JoinName; UIEntity.PickListName = businessEntity.PickListName; UIEntity.TableColumnName = businessEntity.TableColumnName; UIEntity.JoinColumnName = businessEntity.JoinColumnName; UIEntity.IsCalculate = businessEntity.IsCalculate; UIEntity.CalculatedValue = businessEntity.CalculatedValue; UIEntity.Type = businessEntity.Type; UIEntity.Required = businessEntity.Required; UIEntity.Readonly = businessEntity.Readonly; return(UIEntity); }
/// <summary> /// Deletes a 'UIField' from the database /// This method calls the DataBridgeManager to execute the delete using the /// procedure 'UIField_Delete'. /// </summary> /// <param name='uifield'>The 'UIField' to delete.</param> /// <returns>True if the delete is successful or false if not.</returns> public bool Delete(UIField tempUIField) { // locals bool deleted = false; // Get information for calling 'DataBridgeManager.PerformDataOperation' method. string methodName = "DeleteUIField"; string objectName = "ApplicationLogicComponent.Controllers"; try { // verify tempuIField exists before attemptintg to delete if (tempUIField != null) { // Create Delegate For DataOperation ApplicationController.DataOperationMethod deleteUIFieldMethod = this.AppController.DataBridge.DataOperations.UIFieldMethods.DeleteUIField; // Create parameters for this method List <PolymorphicObject> parameters = CreateUIFieldParameter(tempUIField); // Perform DataOperation PolymorphicObject returnObject = this.AppController.DataBridge.PerformDataOperation(methodName, objectName, deleteUIFieldMethod, parameters); // If return object exists if (returnObject != null) { // Test For True if (returnObject.Boolean.Value == NullableBooleanEnum.True) { // Set Deleted To True deleted = true; } } } } catch (Exception error) { // If ErrorProcessor exists if (this.ErrorProcessor != null) { // Log the current error this.ErrorProcessor.LogError(methodName, objectName, error); } } // return value return(deleted); }
/// <summary> /// This method creates the parameter for a 'UIField' data operation. /// </summary> /// <param name='uifield'>The 'UIField' to use as the first /// parameter (parameters[0]).</param> /// <returns>A List<PolymorphicObject> collection.</returns> private List <PolymorphicObject> CreateUIFieldParameter(UIField uIField) { // Initial Value List <PolymorphicObject> parameters = new List <PolymorphicObject>(); // Create PolymorphicObject to hold the parameter PolymorphicObject parameter = new PolymorphicObject(); // Set parameter.ObjectValue parameter.ObjectValue = uIField; // Add userParameter to parameters parameters.Add(parameter); // return value return(parameters); }
protected override void Build(UIField f) { base.Build(f); RemoveAllItemBuilders(); if (CurrentField != null) { UIArrayField arrayField = CurrentField as UIArrayField; if (arrayField.ItemFields != null) { foreach (UIField itemField in arrayField.ItemFields) { AddItemBuilder(itemField, false); } } } UpdateScrollBar(); }
/// <summary> /// Take a UIField, a delegate to resolve the UI widget value and a map of input->expected values and validates the results for a given field /// </summary> /// <param name="field"></param> /// <param name="collectValueFromWidget">A delegate to resolve the currently displayed widget value</param> /// <param name="valuesMap">A map of input to expected values</param> /// <returns></returns> public static Task ValidateAgainstValueMap(UIField field, ThemeConfig theme, Func <UIField, string> collectValueFromWidget, IEnumerable <ValueMap> valuesMap) { // *************** Enable to investigate/debug/develop new/existing tests ************************ bool investigateDebugTests = false; var perItemDelay = investigateDebugTests ? 1000 : 0; var testsWindow = new UIFieldTestWindow(500, 200, field, theme); return(testsWindow.RunTest((testRunner) => { foreach (var item in valuesMap) { testsWindow.SetAndValidateValues(item.ExpectedValue, item.InputValue, collectValueFromWidget, perItemDelay); } return Task.CompletedTask; }, 30)); }
/// <summary> /// This method creates an instance of a /// 'FindUIFieldStoredProcedure' object and /// creates the sql parameter[] array needed /// to execute the procedure 'UIField_Find'. /// </summary> /// <param name="uIField">The 'UIField' to use to /// get the primary key parameter.</param> /// <returns>An instance of an FetchUserStoredProcedure</returns> public static FindUIFieldStoredProcedure CreateFindUIFieldStoredProcedure(UIField uIField) { // Initial Value FindUIFieldStoredProcedure findUIFieldStoredProcedure = null; // verify uIField exists if (uIField != null) { // Instanciate findUIFieldStoredProcedure findUIFieldStoredProcedure = new FindUIFieldStoredProcedure(); // Now create parameters for this procedure findUIFieldStoredProcedure.Parameters = CreatePrimaryKeyParameter(uIField); } // return value return(findUIFieldStoredProcedure); }
/// <summary> /// This method creates the sql Parameter[] array /// that holds the primary key value. /// </summary> /// <param name='uIField'>The 'UIField' to get the primary key of.</param> /// <returns>A SqlParameter[] array which contains the primary key value. /// to delete.</returns> internal static SqlParameter[] CreatePrimaryKeyParameter(UIField uIField) { // Initial Value SqlParameter[] parameters = new SqlParameter[1]; // verify user exists if (uIField != null) { // Create PrimaryKey Parameter SqlParameter @Id = new SqlParameter("@Id", uIField.Id); // Set parameters[0] to @Id parameters[0] = @Id; } // return value return(parameters); }
/// <summary> /// Finds a 'UIField' object by the primary key. /// This method used the DataBridgeManager to execute the 'Find' using the /// procedure 'UIField_Find'</param> /// </summary> /// <param name='tempUIField'>A temporary UIField for passing values.</param> /// <returns>A 'UIField' object if found else a null 'UIField'.</returns> public UIField Find(UIField tempUIField) { // Initial values UIField uIField = null; // Get information for calling 'DataBridgeManager.PerformDataOperation' method. string methodName = "Find"; string objectName = "ApplicationLogicComponent.Controllers"; try { // If object exists if (tempUIField != null) { // Create DataOperation ApplicationController.DataOperationMethod findMethod = this.AppController.DataBridge.DataOperations.UIFieldMethods.FindUIField; // Create parameters for this method List <PolymorphicObject> parameters = CreateUIFieldParameter(tempUIField); // Perform DataOperation PolymorphicObject returnObject = this.AppController.DataBridge.PerformDataOperation(methodName, objectName, findMethod, parameters); // If return object exists if ((returnObject != null) && (returnObject.ObjectValue as UIField != null)) { // Get ReturnObject uIField = (UIField)returnObject.ObjectValue; } } } catch (Exception error) { // If ErrorProcessor exists if (this.ErrorProcessor != null) { // Log the current error this.ErrorProcessor.LogError(methodName, objectName, error); } } // return value return(uIField); }
/// <summary> /// Insert a 'UIField' object into the database. /// This method uses the DataBridgeManager to execute the 'Insert' using the /// procedure 'UIField_Insert'.</param> /// </summary> /// <param name='uIField'>The 'UIField' object to insert.</param> /// <returns>The id (int) of the new 'UIField' object that was inserted.</returns> public int Insert(UIField uIField) { // Initial values int newIdentity = -1; // Get information for calling 'DataBridgeManager.PerformDataOperation' method. string methodName = "Insert"; string objectName = "ApplicationLogicComponent.Controllers"; try { // If UIFieldexists if (uIField != null) { ApplicationController.DataOperationMethod insertMethod = this.AppController.DataBridge.DataOperations.UIFieldMethods.InsertUIField; // Create parameters for this method List <PolymorphicObject> parameters = CreateUIFieldParameter(uIField); // Perform DataOperation PolymorphicObject returnObject = this.AppController.DataBridge.PerformDataOperation(methodName, objectName, insertMethod, parameters); // If return object exists if (returnObject != null) { // Set return value newIdentity = returnObject.IntegerValue; } } } catch (Exception error) { // If ErrorProcessor exists if (this.ErrorProcessor != null) { // Log the current error this.ErrorProcessor.LogError(methodName, objectName, error); } } // return value return(newIdentity); }
/// <summary> /// This method Updates a 'UIField' object in the database. /// This method used the DataBridgeManager to execute the 'Update' using the /// procedure 'UIField_Update'.</param> /// </summary> /// <param name='uIField'>The 'UIField' object to update.</param> /// <returns>True if successful else false if not.</returns> public bool Update(UIField uIField) { // Initial value bool saved = false; // Get information for calling 'DataBridgeManager.PerformDataOperation' method. string methodName = "Update"; string objectName = "ApplicationLogicComponent.Controllers"; try { if (uIField != null) { // Create Delegate ApplicationController.DataOperationMethod updateMethod = this.AppController.DataBridge.DataOperations.UIFieldMethods.UpdateUIField; // Create parameters for this method List <PolymorphicObject> parameters = CreateUIFieldParameter(uIField); // Perform DataOperation PolymorphicObject returnObject = this.AppController.DataBridge.PerformDataOperation(methodName, objectName, updateMethod, parameters); // If return object exists if ((returnObject != null) && (returnObject.Boolean != null) && (returnObject.Boolean.Value == NullableBooleanEnum.True)) { // Set saved to true saved = true; } } } catch (Exception error) { // If ErrorProcessor exists if (this.ErrorProcessor != null) { // Log the current error this.ErrorProcessor.LogError(methodName, objectName, error); } } // return value return(saved); }
private UIFieldBuilder AddItemBuilder(UIField itemField, bool selectItem) { int fieldCount = ItemBuilderCount; if (itemFieldBuilders != null && itemFieldBuilders.Count > 0) { UIFieldBuilder newItemFieldBuilder; if (fieldCount == 0) { newItemFieldBuilder = itemFieldBuilders[0]; if (newItemFieldBuilder == null) { return(null); } newItemFieldBuilder.gameObject.SetActive(true); } else { newItemFieldBuilder = Instantiate(itemFieldBuilders[0], arrayRoot); if (newItemFieldBuilder == null) { return(null); } itemFieldBuilders.Add(newItemFieldBuilder); } newItemFieldBuilder.CurrentField = itemField; ISelectableField newSelectableItem = newItemFieldBuilder.GetComponentInChildren <ISelectableField>(true); if (newSelectableItem != null) { newSelectableItem.AddSelectListener(SelectField); if (selectItem) { newSelectableItem.SelectField(); } } UpdateScrollBar(); return(newItemFieldBuilder); } return(null); }
/// <summary> /// Take a UIField, a delegate to resolve the UI widget value and a map of input->expected values and validates the results for a given field /// </summary> /// <param name="field"></param> /// <param name="collectValueFromWidget">A delegate to resolve the currently displayed widget value</param> /// <param name="valuesMap">A map of input to expected values</param> /// <returns></returns> public static Task ValidateAgainstValueMap(UIField field, Func <UIField, string> collectValueFromWidget, IEnumerable <ValueMap> valuesMap) { // *************** Enable to investigate/debug/develop new/existing tests ************************ bool investigateDebugTests = false; var perItemDelay = (investigateDebugTests) ? 500 : 0; var testsWindow = new UIFieldTestWindow(400, 200, field); return(testsWindow.RunTest((testRunner) => { var primaryFieldWidget = field.Content as MHNumberEdit; foreach (var item in valuesMap) { testsWindow.SetAndValidateValues(item.ExpectedValue, item.InputValue, collectValueFromWidget, perItemDelay); } return Task.CompletedTask; }, 30)); }
private void BuildField(UIField f, out float fieldHeight) { fieldHeight = 0f; if (f == null) { return; } string fieldTypeName = f.GetType().Name; int fieldPrefabIndex = Array.IndexOf(FieldTypeNames, fieldTypeName); UIFieldBuilder prefab = fieldPrefabIndex >= 0 && fieldPrefabIndex < fieldPrefabs.Length ? fieldPrefabs[fieldPrefabIndex] : null; if (prefab == null) { return; } UIFieldBuilder fieldInstance = Instantiate(prefab, fieldInstancesRoot); fieldInstance.CurrentField = f; fieldHeight = prefab.GetComponent <RectTransform>().rect.height; fieldInstances.Add(fieldInstance); }
/// <summary> /// This method loads a 'UIField' object /// from the dataRow passed in. /// </summary> /// <param name='dataRow'>The 'DataRow' to load from.</param> /// <returns>A 'UIField' DataObject.</returns> public static UIField Load(DataRow dataRow) { // Initial Value UIField uIField = new UIField(); // Create field Integers int captionfield = 0; int dataTypefield = 1; int dTNFieldIdfield = 2; int fieldOrdinalfield = 3; int idfield = 4; int maxLengthfield = 5; int maxRangefield = 6; int minLengthfield = 7; int minRangefield = 8; int requiredfield = 9; int userInterfaceIdfield = 10; try { // Load Each field uIField.Caption = DataHelper.ParseString(dataRow.ItemArray[captionfield]); uIField.DataType = (DataTypeEnum)DataHelper.ParseInteger(dataRow.ItemArray[dataTypefield], 0); uIField.DTNFieldId = DataHelper.ParseInteger(dataRow.ItemArray[dTNFieldIdfield], 0); uIField.FieldOrdinal = DataHelper.ParseInteger(dataRow.ItemArray[fieldOrdinalfield], 0); uIField.UpdateIdentity(DataHelper.ParseInteger(dataRow.ItemArray[idfield], 0)); uIField.MaxLength = DataHelper.ParseInteger(dataRow.ItemArray[maxLengthfield], 0); uIField.MaxRange = DataHelper.ParseDouble(dataRow.ItemArray[maxRangefield], 0); uIField.MinLength = DataHelper.ParseInteger(dataRow.ItemArray[minLengthfield], 0); uIField.MinRange = DataHelper.ParseDouble(dataRow.ItemArray[minRangefield], 0); uIField.Required = DataHelper.ParseBoolean(dataRow.ItemArray[requiredfield], false); uIField.UserInterfaceId = DataHelper.ParseInteger(dataRow.ItemArray[userInterfaceIdfield], 0); } catch { } // return value return(uIField); }
/// <summary> /// This method fetches a collection of 'UIField' objects. /// This method used the DataBridgeManager to execute the fetch all using the /// procedure 'UIField_FetchAll'.</summary> /// <param name='tempUIField'>A temporary UIField for passing values.</param> /// <returns>A collection of 'UIField' objects.</returns> public List <UIField> FetchAll(UIField tempUIField) { // Initial value List <UIField> uIFieldList = null; // Get information for calling 'DataBridgeManager.PerformDataOperation' method. string methodName = "FetchAll"; string objectName = "ApplicationLogicComponent.Controllers"; try { // Create DataOperation Method ApplicationController.DataOperationMethod fetchAllMethod = this.AppController.DataBridge.DataOperations.UIFieldMethods.FetchAll; // Create parameters for this method List <PolymorphicObject> parameters = CreateUIFieldParameter(tempUIField); // Perform DataOperation PolymorphicObject returnObject = this.AppController.DataBridge.PerformDataOperation(methodName, objectName, fetchAllMethod, parameters); // If return object exists if ((returnObject != null) && (returnObject.ObjectValue as List <UIField> != null)) { // Create Collection From ReturnObject.ObjectValue uIFieldList = (List <UIField>)returnObject.ObjectValue; } } catch (Exception error) { // If ErrorProcessor exists if (this.ErrorProcessor != null) { // Log the current error this.ErrorProcessor.LogError(methodName, objectName, error); } } // return value return(uIFieldList); }
public UMHDataConstituentSearchHelper(RootUIModel model, Blackbaud.AppFx.XmlTypes.SearchListOutputType outputDefinition) { _model = model; _outputDefinition = outputDefinition; _checkmergedconstituents = (BooleanField)_model.Fields["CHECKMERGEDCONSTITUENTS"]; _exactmatchonly = (BooleanField)_model.Fields["EXACTMATCHONLY"]; _includeindividuals = (BooleanField)_model.Fields["INCLUDEINDIVIDUALS"]; _checknickname = (BooleanField)_model.Fields["CHECKNICKNAME"]; _checkaliases = (BooleanField)_model.Fields["CHECKALIASES"]; _onlyprimaryaddress = (BooleanField)_model.Fields["ONLYPRIMARYADDRESS"]; _includeorganizations = (BooleanField)_model.Fields["INCLUDEORGANIZATIONS"]; _includegroups = (BooleanField)_model.Fields["INCLUDEGROUPS"]; _excludecustomgroups = (BooleanField)_model.Fields["EXCLUDECUSTOMGROUPS"]; _excludehouseholds = (BooleanField)_model.Fields["EXCLUDEHOUSEHOLDS"]; _fuzzysearchonname = (BooleanField)_model.Fields["FUZZYSEARCHONNAME"]; _countryId = (SimpleDataListField <Guid>)_model.Fields["COUNTRYID"]; _stateid = (SimpleDataListField <Guid>)_model.Fields["STATEID"]; _postcode = (SearchListField <string>)_model.Fields["POSTCODE"]; _keyname = (StringField)_model.Fields["KEYNAME"]; _firstname = (StringField)_model.Fields["FIRSTNAME"]; _addressblock = (StringField)_model.Fields["ADDRESSBLOCK"]; _city = (StringField)_model.Fields["CITY"]; _primarybusiness = (StringField)_model.Fields["PRIMARYBUSINESS"]; _emailaddress = (StringField)_model.Fields["EMAILADDRESS"]; _ssn = (StringField)_model.Fields["SSN"]; _searchin = (StringField)_model.Fields["SEARCHIN"]; _minimumdate = (DateField)_model.Fields["MINIMUMDATE"]; _classof = (YearField)_model.Fields["CLASSOF"]; UIField constituentQuickFindField = null; if (_model.Fields.TryGetValue("CONSTITUENTQUICKFIND", ref constituentQuickFindField)) { _constituentquickfind = (StringField)constituentQuickFindField; } _hideadvancedoptions = (GenericUIAction)_model.Actions["HIDEADVANCEDOPTIONS"]; _showadvancedoptions = (GenericUIAction)_model.Actions["SHOWADVANCEDOPTIONS"]; }
/// <summary> /// This method loads a collection of 'UIField' objects. /// from the dataTable.Rows object passed in. /// </summary> /// <param name='dataTable'>The 'DataTable.Rows' to load from.</param> /// <returns>A UIField Collection.</returns> public static List <UIField> LoadCollection(DataTable dataTable) { // Initial Value List <UIField> uIFields = new List <UIField>(); try { // Load Each row In DataTable foreach (DataRow row in dataTable.Rows) { // Create 'UIField' from rows UIField uIField = Load(row); // Add this object to collection uIFields.Add(uIField); } } catch { } // return value return(uIFields); }
public bool MoveField(int fromIndex, int toIndex) { if (CurrentField != null && CurrentField is UIArrayField) { bool move = (CurrentField as UIArrayField).MoveField(fromIndex, toIndex); if (move == false) { return(false); } UIField swapField = itemFieldBuilders[fromIndex].CurrentField; itemFieldBuilders[fromIndex].CurrentField = itemFieldBuilders[toIndex].CurrentField; itemFieldBuilders[toIndex].CurrentField = swapField; ISelectableField selectable = itemFieldBuilders[toIndex].GetComponentInChildren <ISelectableField>(true); if (selectable != null) { selectable.SelectField(); } return(true); } else { return(false); } }
private static FlowLayoutWidget CreateSettingsColumn(EditableProperty property, UIField field) { return(CreateSettingsColumn(property.DisplayName.Localize(), field, property.Description.Localize())); }