This is DataAbstract for .NET
Say I have the following InsertStatement and a BusinessProcessor that uses it.
INSERT
INTO [v_dgPric]
([s_id], [s_creid], [s_credate], [s_chgid], [s_chgdate],
[p_text], [p_acttype], [p_dep], [p_actrefid], [p_costprice])
VALUES
(:Id, :CreateBy, :CreateDate, :ChangeBy, :ChangeDate,
:Description, :ActivityTypeId, :Department, :ActivityId,
:Costprice)
I’ve added a BeforeProcessChange event handler and in it I have:
if (aEA.DeltaChange.Type == ChangeType.Insert)
{
…
aEA.DeltaChange.NewValues[“CreateBy”] = Convert.ToInt32(Session[“SID”]);
aEA.DeltaChange.NewValues[“CreateDate”] = DateTime.Now;
aEA.DeltaChange.NewValues[“ChangeBy”] = Convert.ToInt32(Session[“SID”]);
aEA.DeltaChange.NewValues[“ChangeDate”] = DateTime.Now;
aEA.DeltaChange.NewValues[“Department”] = Convert.ToInt32(Session[“DEPID”]);
This works great, but I would like to add these values to inserted record without exposing the fields through the DataTable so a minimum of info is sent to the client.
Would it be possible to set these values another place perhaps as parameter values to the InsertStatement so these fields can be removed from the schema?
Thanks!