Beispiel #1
0
    public RepoMapConnect(databaseTable DBT)
    {
        CompiledRepositories CR = new CompiledRepositories();

        this.map  = CR.mapGrab(DBT);
        this.repo = CR.repositoryGrab(DBT);
    }
Beispiel #2
0
 public RepoMapConnect(databaseTable DBT)
 {
     CompiledRepositories CR = new CompiledRepositories();
     this.map = CR.mapGrab(DBT);
     this.repo = CR.repositoryGrab(DBT);
 }
Beispiel #3
0
    internal dynamic processTableFunction(databaseTable dbt, tableFunction tfunc, params dynamic[] args)
    {
        CompiledRepositories CR = new CompiledRepositories();
        dynamic      repo       = CR.repositoryGrab(dbt);
        tableFormats tf         = new tableFormats();

        if (tfunc == tableFunction.paramArray || tfunc == tableFunction.processRow)
        {
            switch (tfunc)
            {
            case tableFunction.processRow:
                return(conversion(repo.populateMap(args[0])));

            case tableFunction.paramArray:
                return(repo.ParamArray);

            default:
                return(conversion(null));
            }
        }
        else
        {
            switch (dbt)
            {
            case databaseTable.PrimaryAccount:
                switch (tfunc)
                {
                case tableFunction.sqlParamPopulate:
                    return(repo.sqlParamPopulate((PrimaryAccountMap)(object)args[0], args[1]));

                case tableFunction.tableFormatChoose:
                    return(conversion(tf.PrimaryAccount()));

                default:
                    return(conversion(null));
                }

            case databaseTable.Sessions:
                switch (tfunc)
                {
                case tableFunction.sqlParamPopulate:
                    return(repo.sqlParamPopulate((SessionsMap)(object)args[0], args[1]));

                case tableFunction.tableFormatChoose:
                    return(conversion(tf.Sessions()));

                default:
                    return(conversion(null));
                }

            case databaseTable.CoinBank:
                switch (tfunc)
                {
                case tableFunction.sqlParamPopulate:
                    return(repo.sqlParamPopulate((CoinBankMap)(object)args[0], args[1]));

                case tableFunction.tableFormatChoose:
                    return(conversion(tf.CoinBank()));

                default:
                    return(conversion(null));
                }

            case databaseTable.TotalCoins:
                switch (tfunc)
                {
                case tableFunction.sqlParamPopulate:
                    return(repo.sqlParamPopulate((TotalCoinsMap)(object)args[0], args[1]));

                case tableFunction.tableFormatChoose:
                    return(conversion(tf.TotalCoins()));

                default:
                    return(conversion(null));
                }

            case databaseTable.CoinOrder:
                switch (tfunc)
                {
                case tableFunction.sqlParamPopulate:
                    return(repo.sqlParamPopulate((CoinOrderMap)(object)args[0], args[1]));

                case tableFunction.tableFormatChoose:
                    return(conversion(tf.CoinOrder()));

                default:
                    return(conversion(null));
                }

            case databaseTable.Logs:
                switch (tfunc)
                {
                case tableFunction.sqlParamPopulate:
                    return(repo.sqlParamPopulate((LogsMap)(object)args[0], args[1]));

                case tableFunction.tableFormatChoose:
                    return(conversion(tf.Logs()));

                default:
                    return(conversion(null));
                }

            default:
                return(conversion(null));
            }
        }
    }