/// <summary>
 ///  Create a basic instance of the DashBoard Controller for test
 /// </summary>
 /// <param name="ModelBuilderDAO"></param>
 /// <param name="ModelBuilderDB"></param>
 /// <param name="cm"></param>
 /// <param name="ModelBuilderManager"></param>
 /// <param name="ApiContext"></param>
 public DashBoardController(IModelBuilderDAO ModelBuilderDAO, IModelBuilderDB ModelBuilderDB, IConnectionManager cm, IModelBuilderManager ModelBuilderManager, WebApiContext ApiContext)
     : base()
 {
     _cm = cm;
     _IModelBuilderDAO     = ModelBuilderDAO;
     _IModelBuilderDB      = ModelBuilderDB;
     _IModelBuildermanager = ModelBuilderManager;
     _ApiContext           = ApiContext;
 }
Beispiel #2
0
 /// <summary>
 /// Create a basic instance of the BudgetModel DAO class
 /// </summary>
 /// <param name="context"></param>
 /// <param name="db"></param>
 public ModelBuilderDAO(WebApiContext context, IModelBuilderDB db)
 {
     // testing
     _context = context.TraceContext;
     if (!_context.Keys.Contains("CurrentDAO"))
     {
         _context.Add("CurrentDAO", this.GetType().FullName);
     }
     _DB = db;
 }
Beispiel #3
0
        /// <summary>
        /// Select Property Default Models method
        /// </summary>
        /// <param name="workingObjects"></param>
        /// <param name="bot"></param>
        /// <param name="connection"></param>
        /// <param name="transaction"></param>
        /// <param name="parameters"></param>
        /// <param name="db"></param>
        private void SelectDashBoards
        (
            IDictionary <object, object> workingObjects
            , RPComponents.IBusinessObjectTransaction bot
            , SqlConnection connection
            , SqlTransaction transaction
            , Hashtable parameters
            , IModelBuilderDB db
        )
        {
            db.SetNullParameters();
            db.SetParameters(db.GetDashBoard);

            using
            (
                SqlDataReader reader = ExecuteSqlDataReader
                                       (
                    db.GetDashBoard
                    , parameters
                    , connection
                    , transaction
                                       )
            )
            {
                IList <IDashBoard> DashBoard = new List <IDashBoard>();
                while (reader.Read())
                {
                    IDashBoard bob = (IDashBoard)db.BuildObject(reader);
                    DashBoard.Add(bob);
                    bot.Status = new TransactionStatus(TransactionStatus.Succeeded);
                }
                workingObjects.Add(WorkingTypes.DashBoard, DashBoard);
                if (bot.Status.IsInitial)
                {
                    bot.Status = new TransactionStatus(TransactionStatus.Succeeded);
                }
            }
        }