Skip to content

Commit

Permalink
CONTENT-5799: add DataTypeExpessionEmail type.
Browse files Browse the repository at this point in the history
  • Loading branch information
zyhfish committed Jun 20, 2016
1 parent 6652471 commit 5a393af
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
28 changes: 28 additions & 0 deletions DataTypes/DataTypeExpessionEmail.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Web;
using DotNetNuke.Common;
using DotNetNuke.Modules.UserDefinedTable.Components;
using DotNetNuke.Modules.UserDefinedTable.Interfaces;
using DotNetNuke.Services.Mail;

namespace DotNetNuke.Modules.UserDefinedTable.DataTypes
{
#region DataType

/// -----------------------------------------------------------------------------
/// <summary>
/// MetaData and Formating for DataType "DataTypeExpessionEmail"
/// </summary>
/// -----------------------------------------------------------------------------
public class DataTypeExpessionEmail : DataTypeExpression, IEmailAdressSource
{
public string GetEmailAddress(string fieldName, DataRow row)
{
return row[fieldName].AsString();
}
}

#endregion
}
2 changes: 1 addition & 1 deletion datatypes.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
<dataType name="Separator" />
<!--Please leave the following data types at the end of the list-->
<dataType name="LookUp" />
<dataType name="Expression" typeName="DataTypeExpessionEmail"/>
<dataType name="Expression" typeName="DotNetNuke.Modules.UserDefinedTable.DataTypes.DataTypeExpessionEmail"/>
</dataTypes>

1 comment on commit 5a393af

@kanm2015
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ben, please add DataTypeExpessionEmail.cs to the project file. Thx

Please sign in to comment.