Exemplo n.º 1
0
        public virtual IList <T> GetFilter(List <string> parms, string storeName = "")
        {
            switch (ConnectionName)
            {
            case "Default":
                return(DbAdapter1.ReadList(storeName, Make, true, parms.ToArray()));

            case "Inside":
                return(DbAdapter2.ReadList(storeName, Make, true, parms.ToArray()));

            default:
                return(DbAdapter1.ReadList(storeName, Make, true, parms.ToArray()));
            }
        }
Exemplo n.º 2
0
        public virtual int UpdateCustomField(object[] parms, string sql)
        {
            switch (ConnectionName)
            {
            case "Default":
                return(Convert.ToInt32(DbAdapter1.ExcecuteScalar(sql, false, parms)));

            case "Inside":
                return(Convert.ToInt32(DbAdapter2.ExcecuteScalar(sql, false, parms)));

            default:
                return(Convert.ToInt32(DbAdapter1.ExcecuteScalar(sql, false, parms)));
            }
        }
Exemplo n.º 3
0
        public virtual DataTable GetDataTable(object[] parms, string sql)
        {
            switch (ConnectionName)
            {
            case "Default":
                return(DbAdapter1.ReadDataTable(sql, true, parms));

            case "Inside":
                return(DbAdapter2.ReadDataTable(sql, true, parms));

            default:
                return(DbAdapter1.ReadDataTable(sql, true, parms));
            }
        }
Exemplo n.º 4
0
        public virtual T GetSingleObject(List <string> parms, string storeProcedure)
        {
            switch (ConnectionName)
            {
            case "Default":
                return(DbAdapter1.Read(storeProcedure, Make, true, parms.ToArray()));

            case "Inside":
                return(DbAdapter2.Read(storeProcedure, Make, true, parms.ToArray()));

            default:
                return(DbAdapter1.Read(storeProcedure, Make, true, parms.ToArray()));
            }
        }
Exemplo n.º 5
0
        public virtual object GetSingleData(List <string> parms, string storeProcedure)
        {
            switch (ConnectionName)
            {
            case "Default":
                return(DbAdapter1.ExcecuteScalar(storeProcedure, true, parms.ToArray()));

            case "Inside":
                return(DbAdapter2.ExcecuteScalar(storeProcedure, true, parms.ToArray()));

            default:
                return(DbAdapter1.ExcecuteScalar(storeProcedure, true, parms.ToArray()));
            }
        }
Exemplo n.º 6
0
        public virtual IList <T> GetList(object[] parms)
        {
            string sql = StoreProcedurePrefix + "GetList";

            switch (ConnectionName)
            {
            case "Default":
                return(DbAdapter1.ReadList <T>(sql, Make, true, parms));

            case "Inside":
                return(DbAdapter2.ReadList <T>(sql, Make, true, parms));

            default:
                return(DbAdapter1.ReadList <T>(sql, Make, true, parms));
            }
        }
Exemplo n.º 7
0
        public virtual T GetSingle(long entityID)
        {
            string sql = string.Format(@"SELECT * FROM {0} WHERE {1} = @EntityID", mTableName, mEntityIDName);

            object[] parms = { "@EntityID", entityID };
            switch (ConnectionName)
            {
            case "Default":
                return(DbAdapter1.Read(sql, Make, false, parms));

            case "Inside":
                return(DbAdapter2.Read(sql, Make, false, parms));

            default:
                return(DbAdapter1.Read(sql, Make, false, parms));
            }
        }