Beispiel #1
0
        protected override int ExecuteInsert(IDictionary values)
        {
            FieldValueDictionary fieldValues = new FieldValueDictionary();

            fieldValues.Assign(values, true);
            return(ExecuteAction("New", "Insert", fieldValues));
        }
Beispiel #2
0
        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));
        }
Beispiel #3
0
        protected int ExecuteAction(string lastCommandName, string commandName, FieldValueDictionary fieldValues)
        {
            ActionArgs args = new ActionArgs();

            args.LastCommandName = lastCommandName;
            args.CommandName     = commandName;
            args.Values          = fieldValues.Values.ToArray();
            ActionResult result = ControllerFactory.CreateDataController().Execute(DataController, DataView, args);

            result.RaiseExceptionIfErrors();
            return(result.RowsAffected);
        }