public MasterPresenter(IMasterView masterView = null)
        {
            this.masterView = masterView;

            db = new PortalAukcyjnyEntities();

            if (IsUserLoggedIn())
            {
                currentUserId = GetCurrentUserId();
            }
            else
            {
                currentUserId = Guid.Empty;
            }

            currencyRepo   = new CurrencyExchangeRepository(db);
            auctionsRepo   = new AuctionsRepository(db);
            catRepo        = new CategoriesRepository(db);
            offersRepo     = new OffersRepository(db);
            usersRepo      = new UsersRepository(db);
            commentsRepo   = new CommentsRepository(db);
            observersRepo  = new ObserversRepository(db);
            shipmentsRepo  = new ShipmentsRepository(db);
            imagesRepo     = new ImagesRepository(db);
            buyedItemsRepo = new BuyedItemsRepository(db);
        }
Example #2
0
        void IContentView.InitializeMaster(IMasterView master)
        {
            if (MasterView != null)
            {
                throw new InvalidOperationException("不能重复初始化母板");
            }

            MasterView = master;
        }
Example #3
0
 public MasterPresenter(IMasterView view)
 {
     MasterView = view;
     World      = new World();
 }
Example #4
0
 IHtmlRenderAdapter IContentView.CreateContentAdapter( IMasterView master )
 {
   return new ContentAdapter( this );
 }
Example #5
0
    void IContentView.InitializeMaster( IMasterView master )
    {
      if ( MasterView != null )
        throw new InvalidOperationException( "不能重复初始化母板" );

      MasterView = master;
    }
Example #6
0
 IHtmlRenderAdapter IContentView.CreateContentAdapter(IMasterView master)
 {
     return(new ContentAdapter(this));
 }