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);
        }
Beispiel #2
0
        void IContentView.InitializeMaster(IMasterView master)
        {
            if (MasterView != null)
            {
                throw new InvalidOperationException("不能重复初始化母板");
            }

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

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