public void FeedRow(int id) { row = DynamicRow.FindRow <int>("TABLE1", id); string form = this["Form"].GetValue <string>(""); foreach (string name in row.FieldNames) { blockWeb[form][name].AttachEndPoint(row.GetFieldValue(name)); } }
public void SetKey(ConnectorSysEventArgs eventArgs) { if (eventArgs.EndPointValue != null) { string table = this["Table"].GetValue <string>(); string displayField = this["DisplayField"].GetValue <string>(); string pkField = this["PKField"].GetValue <string>(); //seelct displayField from targetTable where PK_ID = eventArgs.EndPointValue DynamicRow myRow = DynamicRow.FindRow <long>(table, (long)eventArgs.EndPointValue); ctl.Text = "pk=" + (eventArgs.EndPointValue.ToString()) + " value=" + myRow[displayField].fValue.ToString(); } }
public void SaveData() { if (row == null) { row = DynamicRow.FindRow("TABLE1", 3); } foreach (string name in row.FieldNames) { if (name != "PK_ID") { Type fieldType = row.GetFieldType(name); object value = blockWeb["frmMain"][name].ProcessRequest()[0]; object newValue = Convert.ChangeType(value, fieldType); row.SetFieldValue(name, newValue); } } (row as DynamicRow).SaveData(); }