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