Пример #1
0
        protected override int ExecuteInsert(IDictionary values)
        {
            FieldValueDictionary fieldValues = new FieldValueDictionary();

            fieldValues.Assign(values, true);
            return(ExecuteAction("New", "Insert", fieldValues));
        }
Пример #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));
        }
Пример #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);
        }