protected override int ExecuteInsert(IDictionary values) { FieldValueDictionary fieldValues = new FieldValueDictionary(); fieldValues.Assign(values, true); return(ExecuteAction("New", "Insert", fieldValues)); }
protected override int ExecuteDelete(IDictionary keys, IDictionary oldValues) { FieldValueDictionary fieldValues = new FieldValueDictionary(); fieldValues.Assign(keys, false); fieldValues.Assign(keys, true); fieldValues.Assign(oldValues, true); return(ExecuteAction("Select", "Delete", fieldValues)); }
protected int ExecuteAction(string lastCommandName, string commandName, FieldValueDictionary fieldValues) { ActionArgs args = new ActionArgs(); args.Controller = DataController; args.View = DataView; args.LastCommandName = lastCommandName; args.CommandName = commandName; args.Values = fieldValues.Values.ToArray(); ActionResult result = ControllerFactory.CreateDataController().Execute(DataController, DataView, args); result.RaiseExceptionIfErrors(); return(result.RowsAffected); }