Beispiel #1
0
        internal ArrayList Retrieve(int aContextID, RetrieveContext aRContext)
        {
            IDLO dlo = Init(aContextID);
            dlo.Retrieve(aRContext);

            return Format(dlo);
        }
Beispiel #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;
        }
Beispiel #3
0
 public abstract bool PreRetrieve(RetrieveContext aRContext);
Beispiel #4
0
 internal ArrayList Retrieve(string aContext, RetrieveContext aRContext)
 {
     return Retrieve(_Delegate.getContextID(aContext), aRContext);
 }
Beispiel #5
0
 public static BCO createBCO(string aContext, RetrieveContext aRContext)
 {
     return instance.CreateBCO(aContext, aRContext);
 }
Beispiel #6
0
 public static BCO createBCO(int aContextID, RetrieveContext aRContext)
 {
     return instance.CreateBCO(aContextID, aRContext);
 }
Beispiel #7
0
 public BCO CreateBCO(string aContext, RetrieveContext aRContext)
 {
     return new BCO(this, _Factory.Retrieve(aContext, aRContext));
 }
Beispiel #8
0
 public BCO CreateBCO(int aContextID, RetrieveContext aRContext)
 {
     return new BCO(this, _Factory.Retrieve(aContextID, aRContext));
 }