If a field has a Null Type of "Return and Set Alternate on Null..." and the Property Changing Events (either single or multiple) are generated, then the following code is generated.
public System.String FIELD1
{
get
{
object loValue;
loValue = this.CurrentRow["FIELD1"];
if (loValue == DBNull.Value)
{
return "";
}
else
{
return (System.String)loValue;
}
}
set
{
MyBOFieldChangingEventArgs e = new MyBOFieldChangingEventArgs(MyBOFieldNames.FIELD1, value);
this.OnFieldPropertyChanging(this, e);
if (value != "") <===
*** Note: e is not used!!!! ***
{
this.CurrentRow["FIELD1"] = value;
}
else
{
this.CurrentRow["FIELD1"] = DBNull.Value;
}
}
}
The e.FieldValue is not used after returning from the event!!!! The e.FieldValue should be cast/set to value (as it is if the field is not nullable.)