Esempio n. 1
0
        protected override int ExecuteInsert(IDictionary values)
        {
            FieldValueDictionary fieldValues = new FieldValueDictionary();

            fieldValues.Assign(values, true);
            return(ExecuteAction("New", "Insert", fieldValues));
        }
Esempio n. 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));
        }
Esempio n. 3
0
        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);
        }