コード例 #1
0
        }     //END getFormFieldColumns method

        //===================================================================================
        /// <summary>
        /// This method appends the column objects for a list of form fields.
        /// </summary>
        /// <param name="Field">Evado.Digital.Model.EvFormField object</param>
        /// <param name="ResultData"> Evado.Integration.Model.EiData object</param>
        /// <param name="Row"> Evado.Integration.Model.EiDataRow object</param>
        //-----------------------------------------------------------------------------------
        private void getCheckBoxFieldColumnValues(
            Evado.Digital.Model.EdRecordField Field,
            Evado.Integration.Model.EiData ResultData,
            Evado.Integration.Model.EiDataRow Row)
        {
            this.LogMethod("getCheckBoxFieldColumnValues method.");
            //
            // Iterate through the list of checkbox options
            //
            for (int count = 0; count < Field.Design.OptionList.Count; count++)
            {
                //
                // get the option
                //
                Evado.Model.EvOption option = Field.Design.OptionList [count];

                string fieldId = Field.FieldId + "_" + count + "_" + option.Value;

                //
                // Set the checkbox listing output.
                //
                int column = ResultData.getColumnNo(fieldId);

                this.writeProcessLog("Column: " + column + ",\t FieldId: " + fieldId + ", Type: " + Field.TypeId + ", Value: " + Field.ItemValue);

                if (column > -1)
                {
                    if (Field.ItemValue.Contains(option.Value) == true)
                    {
                        Row.updateValue(column, "True");
                    }
                    else
                    {
                        Row.updateValue(column, "False");
                    }
                }
            } //END option iteration loop.
        }     //END getFormFieldColumns method
コード例 #2
0
        }         //END getTableFieldColumn method.

        //===================================================================================
        /// <summary>
        /// This method appends the column objects for a list of form fields.
        /// </summary>
        /// <param name="Field">Evado.Digital.Model.EvFormField object</param>
        /// <param name="ResultData"> Evado.Integration.Model.EiData object</param>
        /// <param name="Row"> Evado.Integration.Model.EiDataRow object</param>
        //-----------------------------------------------------------------------------------
        //private void getTableFieldColumnValues (
        public void getTableFieldColumnValues(
            Evado.Digital.Model.EdRecordField Field,
            Evado.Integration.Model.EiData ResultData,
            Evado.Integration.Model.EiDataRow Row)
        {
            this.LogMethod("getTableFieldColumnValues method.");
            //
            // Iterate through the table columns
            //
            for (int tableRow = 0; tableRow < Field.Table.Rows.Count; tableRow++)
            {
                int row = tableRow + 1;
                //
                // Iterate through the table columns
                //
                for (int tableColumn = 0; tableColumn < Field.Table.Header.Length; tableColumn++)
                {
                    int column = tableColumn + 1;

                    //
                    // Skip empty header text.
                    //
                    if (Field.Table.Header [tableColumn].Text == String.Empty)
                    {
                        continue;
                    }

                    //
                    // Define the output field identifier.
                    //
                    string fieldId = Field.FieldId + "_" + row + "_" + column + "_" + Field.Table.Header [tableColumn].Text;

                    //
                    // Set the checkbox listing output.
                    //
                    int headerColumn = ResultData.getColumnNo(fieldId);
                    //

                    // Header column found
                    //
                    if (headerColumn > -1)
                    {
                        string value = Field.Table.Rows [tableRow].Column [tableColumn];

                        this.LogDebug("Column: " + headerColumn + ",\t FieldId: " + fieldId + ", Type: " + Field.TypeId + ", Value: " + value);

                        //
                        // data type switch to handle boolean values.
                        //
                        switch (Field.Table.Header [tableColumn].TypeId)
                        {
                        case Evado.Model.EvDataTypes.Yes_No:
                        case Evado.Model.EvDataTypes.Boolean:
                        {
                            if (value == "yes" || value == "1" || value == "true")
                            {
                                Row.updateValue(headerColumn, "True");
                            }
                            else
                            {
                                Row.updateValue(headerColumn, "False");
                            }
                            break;
                        }

                        default:
                        {
                            Row.updateValue(headerColumn, value);
                            break;
                        }
                        } //END data type switch
                    }     //END header column index found
                }         //END table column header iteration loop
            }             //END table row  iteration loop
        }                 //END getTableFieldColumn method.
コード例 #3
0
        }         //END getFormFieldColumns

        //===================================================================================
        /// <summary>
        /// This method appends the form field data values to the output row .
        /// </summary>
        /// <param name="FieldList">List of Evado.Digital.Model.EvFormField objects</param>
        /// <param name="ResultData"> Evado.Integration.Model.EiData object</param>
        /// <param name="Row"> Evado.Integration.Model.EiDataRow object</param>
        //-----------------------------------------------------------------------------------
        // private void getFormFieldColumnData (
        public void getFormFieldColumnData(
            List <Evado.Digital.Model.EdRecordField> FieldList,
            Evado.Integration.Model.EiData ResultData,
            Evado.Integration.Model.EiDataRow Row)
        {
            this.LogMethod("getFormFieldColumnData method.");
            //
            // Initialise the method variables and objects.
            //
            int column = 0;

            //
            // Iterate through the field list creating column object for each field object.
            //
            foreach (Evado.Digital.Model.EdRecordField field in FieldList)
            {
                //
                // add the correct column type for the field data type.
                //
                switch (field.TypeId)
                {
                case Evado.Model.EvDataTypes.Boolean:
                {
                    String value = "False";

                    if (field.ItemValue == "yes" ||
                        field.ItemValue == "yes")
                    {
                        value = "True";
                    }

                    column = ResultData.getColumnNo(field.FieldId);

                    this.writeProcessLog("Column: " + column + ",\t FieldId: " + field.FieldId + ", Type: " + field.TypeId + ", Value: " + field.ItemValue);

                    if (column > -1)
                    {
                        Row.updateValue(column, value.ToString( ));
                    }
                    break;
                }

                case Evado.Model.EvDataTypes.Free_Text:
                {
                    column = ResultData.getColumnNo(field.FieldId);

                    this.writeProcessLog("Column: " + column + ",\t FieldId: " + field.FieldId + ", Type: " + field.TypeId + ", Value: " + field.ItemValue);

                    String text = field.ItemText.Replace("\r", "^");
                    text = text.Replace("\n", "^");
                    text = text.Replace("^^", "^");

                    Row.updateValue(column, text);

                    break;
                }

                case Evado.Model.EvDataTypes.Check_Box_List:
                {
                    this.getCheckBoxFieldColumnValues(field, ResultData, Row);
                    break;
                }

                case Evado.Model.EvDataTypes.Table:
                case Evado.Model.EvDataTypes.Special_Matrix:
                {
                    this.getTableFieldColumnValues(field, ResultData, Row);
                    break;
                }

                default:
                {
                    column = ResultData.getColumnNo(field.FieldId);

                    this.writeProcessLog("Column: " + column + ",\t FieldId: " + field.FieldId + ", Type: " + field.TypeId + ", Value: " + field.ItemValue);

                    if (column > -1)
                    {
                        Row.updateValue(column, field.ItemValue);
                    }
                    break;
                }
                } //END data type switch
            }     //END field iteration loop
        }         //END getFormFieldColumns