Exemplo n.º 1
0
        internal ArrayList Retrieve(int aContextID, RetrieveContext aRContext)
        {
            IDLO dlo = Init(aContextID);
            dlo.Retrieve(aRContext);

            return Format(dlo);
        }
Exemplo n.º 2
0
        public DataTable Retrieve(RetrieveContext aRContext)
        {
            this.PreRetrieve(aRContext);
            _RetrieveContext = aRContext;

            SqlConnection conn = new SqlConnection(Engine.Instance.ConnectionString);
            SqlCommand cmd = conn.CreateCommand();
            cmd.CommandType = _SelectCMDType;
            cmd.CommandText = _SelectCMD;
            cmd.CommandTimeout = Engine.CommandTimeout;

            // build Params from BEOKey
            if (aRContext != null)
            {
                for (int i = 0; i < _RetrieveContext.Key.Count; i++)
                {
                    SqlParameter param = cmd.CreateParameter();
                    param.ParameterName = _RetrieveContext.Key[i].Name;
                    param.SqlDbType = _RetrieveContext.Key[i].AsSqlDbType();
                    param.Value = _RetrieveContext.Key[i].Value;

                    cmd.Parameters.Add(param);
                }
            }

            SqlDataAdapter adap = new SqlDataAdapter(cmd);

            conn.Open();

            try
            {

                adap.Fill(_DataTable);

                conn.Close();
            }
            catch (Exception ex)
            {
                if (conn.State != ConnectionState.Closed)
                    conn.Close();

                throw new Exception("Exception in DLO::Retrieve " + this._TableName, ex);
            }

            this.PostRetrieve();
            //AssignTableName();
            //AssignPrimaryKey2Table();

            return _DataTable;
        }
Exemplo n.º 3
0
 public abstract bool PreRetrieve(RetrieveContext aRContext);
Exemplo n.º 4
0
 internal ArrayList Retrieve(string aContext, RetrieveContext aRContext)
 {
     return Retrieve(_Delegate.getContextID(aContext), aRContext);
 }
Exemplo n.º 5
0
 public static BCO createBCO(string aContext, RetrieveContext aRContext)
 {
     return instance.CreateBCO(aContext, aRContext);
 }
Exemplo n.º 6
0
 public static BCO createBCO(int aContextID, RetrieveContext aRContext)
 {
     return instance.CreateBCO(aContextID, aRContext);
 }
Exemplo n.º 7
0
 public BCO CreateBCO(string aContext, RetrieveContext aRContext)
 {
     return new BCO(this, _Factory.Retrieve(aContext, aRContext));
 }
Exemplo n.º 8
0
 public BCO CreateBCO(int aContextID, RetrieveContext aRContext)
 {
     return new BCO(this, _Factory.Retrieve(aContextID, aRContext));
 }