}//END getRecordFieldList method. // ===================================================================================== /// <summary> /// this method processes a form field type that is a numeric. /// </summary> /// <param name="Row">The DataRow containing the field</param> /// <param name="FormField"> Evado.Model.Forms.EvFormField object, containg the field data.</param> // ------------------------------------------------------------------------------------- private void getCheckBoxValue(DataRow Row, Evado.Digital.Model.EdRecordField FormField) { LogMethod("getCheckBoxValue"); // // Get the field value. // String columnId = EvSqlMethods.getString(Row, EdRecordValues.DB_VALUES_COLUMN_ID); bool value = EvSqlMethods.getBool(Row, EdRecordValues.DB_VALUES_NUMERIC); this.LogDebug(" columnId: " + columnId + ", value: " + value); if (value == false) { LogMethodEnd("getCheckBoxValue"); return; } // // iterate through the list looking for a matching option value. // foreach (EvOption option in FormField.Design.OptionList) { if (option.Value == columnId) { FormField.ItemValue += ";" + option.Value; } } LogMethodEnd("getCheckBoxValue"); }//END getCheckBoxValue method
}//ENd getHeaderColumnNo method // ===================================================================================== /// <summary> /// this method updates a table cell value form the query result set. /// Note: the cell indexes are zero based. /// </summary> /// <param name="Row">The DataRow containing the field</param> /// <param name="Col">Int: The column index in the able.</param> /// <param name="RecordField"> Evado.Model.Forms.EvFormField object, containg the field data.</param> // ------------------------------------------------------------------------------------- private String getTableColumnValue(DataRow Row, int Col, Evado.Digital.Model.EdRecordField RecordField) { LogMethod("getTableColumnValue"); // // Select the column to retieve the value from // switch (RecordField.Table.Header [Col].TypeId) { case EvDataTypes.Numeric: { float fltValue = EvSqlMethods.getFloat(Row, EdRecordValues.DB_VALUES_NUMERIC); return(fltValue.ToString( )); } case EvDataTypes.Yes_No: { bool bYesNo = EvSqlMethods.getBool(Row, EdRecordValues.DB_VALUES_NUMERIC); string value = "No"; if (bYesNo == true) { value = "Yes"; } return(value); } case EvDataTypes.Date: { DateTime dtValue = EvSqlMethods.getDateTime(Row, EdRecordValues.DB_VALUES_DATE); if (dtValue == Evado.Model.EvStatics.CONST_DATE_NULL) { return(String.Empty); } // // Return the value. // return(dtValue.ToString("dd MMM yyyy")); } default: { return(EvSqlMethods.getString(Row, EdRecordValues.DB_VALUES_STRING)); } } //END table column type switch. } //END getTableColumnValue method
}//END getCheckBoxValue method // ===================================================================================== /// <summary> /// this method updates a table cell value form the query result set. /// Note: the cell indexes are zero based. /// </summary> /// <param name="Row">The DataRow containing the field</param> /// <param name="FormField"> Evado.Model.Forms.EvFormField object, containg the field data.</param> // ------------------------------------------------------------------------------------- private void getTableCellValue(DataRow Row, Evado.Digital.Model.EdRecordField FormField) { LogMethod("getTableCellValue"); // // Validate that the table exists. // if (FormField.Table == null) { this.LogDebug("FormField.Table is null"); return; } // // Get the field row values. // int row = EvSqlMethods.getInteger(Row, EdRecordValues.DB_VALUES_ROW); String columnId = EvSqlMethods.getString(Row, EdRecordValues.DB_VALUES_COLUMN_ID); // // get the colum no // int col = getHeaderColumnNo(FormField.Table.Header, columnId); // // get the column row value. // string value = this.getTableColumnValue(Row, col, FormField); LogMethodEnd("getTableColumnValue"); // // Add the value to the table. // if (row < FormField.Table.Rows.Count) { FormField.Table.Rows [row].Column [col] = value; } this.LogDebug(" Row: " + row + " col: " + col + ", value: " + FormField.Table.Rows [row].Column [col]); LogMethodEnd("getTableCellValue"); }//END getTableCellValue method