Example #1
0
 protected override string CreateMasterQuery(SqlProxyParameterCollection parameters)
 {
     return(new QueryBuilder()
            .SelectAllFrom <EF_Codes>()
            .Where(EF_Codes.CodeType).IsEqualTo(parameters["@p1"])
            .Query);
 }
Example #2
0
        protected override string CreateMasterQuery(SqlProxyParameterCollection dParam)
        {
            var qB = new QueryBuilder();

            return(qB.SelectAllFrom <CustomerTable>().
                   Where(CustomerTable.ID).IsEqualTo(dParam["@p1"]).
                   Query);
        }
Example #3
0
 protected override void CreateSlaveParam <T>(SqlProxyParameterCollection parameters)
 {
     if (typeof(T) == typeof(EF_CodeSegment))
     {
         parameters.Add(
             new SqlProxyParameter("@p2", EF_CodeSegment.CodeType));
     }
 }
Example #4
0
        protected override void CreateMasterParam(SqlProxyParameterCollection parameters)
        {
            parameters.Add(
                new SqlProxyParameter("@p1", EF_Counter.Year));

            parameters.Add(
                new SqlProxyParameter("@p2", EF_Counter.Type));
        }
Example #5
0
        protected override string CreateMasterQuery(SqlProxyParameterCollection parameters)
        {
            var qb = new QueryBuilder();

            return(new QueryBuilder()
                   .SelectAll <EF_Users>()
                   .From <EF_Users>()
                   .Where(EF_Users.Username).IsEqualTo(parameters["@p1"])
                   .Query);
        }
Example #6
0
        protected override string CreateSlaveQuery <T>(SqlProxyParameterCollection parameters)
        {
            if (typeof(T) == typeof(EF_CodeSegment))
            {
                var qb = new QueryBuilder().
                         SelectAllFrom <EF_CodeSegment>().
                         Where(EF_CodeSegment.CodeType).IsEqualTo(parameters["@p1"]).
                         OrderBy(EF_CodeSegment.Segment);

                return(qb.Query);
            }

            return("");
        }
Example #7
0
        private void CreateConnection()
        {
            rdrDataSet        = new DataSet("GridDataSet");
            rdrFindSqlCommand = new SqlProxyCommand()
            {
                Connection = rdrConnection
            };

            rdrBrowseSqlCommand = new SqlProxyCommand
            {
                Connection = rdrConnection
            };
            rdrParameters = new SqlProxyParameterCollection(rdrBrowseSqlCommand);

            rdrBrowseSqlCommand.CommandText = DefineBrowseQuery(rdrBrowseSqlCommand, string.Empty);
            rdrDataAdapter = new SqlProxyDataAdapter(rdrBrowseSqlCommand);
        }
Example #8
0
 public SqlProxyCommand(ISqlProviderCommand command)
 {
     Command    = command;
     Parameters = new SqlProxyParameterCollection(Command);
 }
Example #9
0
 protected override void CreateMasterParam(SqlProxyParameterCollection parameters)
 {
     parameters.Add(
         new SqlProxyParameter("@p1", EF_Users.Username));
 }
Example #10
0
 protected virtual void CreateMasterParam(SqlProxyParameterCollection parameters)
 {
 }
Example #11
0
 protected virtual void CreateSlaveParam <T, S>(SqlProxyParameterCollection parameters)
 {
 }
Example #12
0
 protected abstract string CreateMasterQuery(SqlProxyParameterCollection parameters);
Example #13
0
 protected virtual string CreateSlaveQuery <T>(SqlProxyParameterCollection parameters)
 {
     return(string.Empty);
 }
Example #14
0
 public SqlProxyCommand(string cmdText, SqlProxyConnection connection)
 {
     dbConnection = connection;
     dbCommand    = ProxyProviderLoader.CreateInstance <ISqlProviderCommand>("SqlProvider.SqlProviderCommand", cmdText, connection);
     Parameters   = new SqlProxyParameterCollection(dbCommand);
 }
Example #15
0
 public SqlProxyCommand(IDbCommand command)
 {
     Command    = ProxyProviderLoader.CreateInstance <ISqlProviderCommand>("SqlProvider.SqlProviderCommand", command);
     Parameters = new SqlProxyParameterCollection(Command);
 }
Example #16
0
 public virtual void CreateSlaveParam(string name, SqlProxyParameterCollection parameters)
 {
 }
Example #17
0
 protected override void CreateMasterParam(SqlProxyParameterCollection parameters)
 {
     parameters.Add(
         new SqlProxyParameter("@p1", EF_Codes.CodeType)
         );
 }
Example #18
0
 protected override void CreateMasterParam(SqlProxyParameterCollection parameters)
 {
     parameters.Add(
         new SqlProxyParameter("@p1", CustomerTable.ID)
         );
 }
Example #19
0
 public SqlProxyCommand(string cmdText)
 {
     Command    = ProxyProviderLoader.CreateInstance <ISqlProviderCommand>("SqlProvider.SqlProviderCommand", cmdText);
     Parameters = new SqlProxyParameterCollection(Command);
 }
Example #20
0
 public SqlProxyCommand(string cmdText, SqlProxyConnection connection, SqlProxyTransaction transaction)
 {
     Command    = ProxyProviderLoader.CreateInstance <ISqlProviderCommand>("SqlProvider.SqlProviderCommand", cmdText, connection.Connection, transaction.Transaction);
     Parameters = new SqlProxyParameterCollection(Command);
 }
Example #21
0
 public virtual string CreateSlaveQuery(string name, SqlProxyParameterCollection parameters)
 {
     return(string.Empty);
 }
Example #22
0
 public SqlProxyCommand()
 {
     dbCommand  = ProxyProviderLoader.CreateInstance <ISqlProviderCommand>("SqlProvider.SqlProviderCommand");
     Parameters = new SqlProxyParameterCollection(dbCommand);
 }