예제 #1
0
        private void ShowStore_Click(object sender, EventArgs e)
        {
            if (MyStores.SelectedItem == null)
            {
                return;
            }

            String       SelectedItem = MyStores.SelectedItem.ToString();
            StoreRawData tempData     = new StoreRawData();

            tempData.RefactorString(SelectedItem);
            String StoreID = tempData.ID;

            String       UserID       = controllerSO.storeOwner.Data.ID;
            StoreRawData storeRawData = new StoreRawData();

            storeRawData.RefactorString(MyStores.SelectedItem.ToString());
            Statistics statistics = controllerSO.GetStoreStat(storeRawData.ID);

            UserStoreData userStoreData = new UserStoreData(UserID, storeRawData, statistics);

            Store store = new Store(userStoreData);

            StoreController        storeController        = new StoreController(store);
            StoreProductController storeProductController = new StoreProductController();

            StoreLayoutPage storeLayoutPage = new StoreLayoutPage(controllerSO, storeController, storeProductController, false);

            storeLayoutPage.Show();
        }
예제 #2
0
        public StoreLayoutPage(StoreOwnerController controllerSO, StoreController controllerStore, StoreProductController controllerStoreProduct, bool b)
        {
            InitializeComponent();
            this.collMode               = b;
            this.TuserName.Text         = controllerSO.storeOwner.Data.ID;
            this.Temail.Text            = controllerSO.storeOwner.Data.email;
            this.Tname.Text             = controllerSO.storeOwner.Data.name;
            this.Trole.Text             = controllerSO.storeOwner.Data.role;
            this.controllerSO           = controllerSO;
            this.controllerStore        = controllerStore;
            this.controllerStoreProduct = controllerStoreProduct;
            this.TStoreName.Text        = controllerStore.store.storeData.storeData.Name;
            this.TstoreType.Text        = controllerStore.store.storeData.storeData.Type;
            this.TstoreLocation.Text    = controllerStore.store.storeData.storeData.Location;

            if (collMode)
            {
                this.CollabHistory.Visible  = false;
                this.BCollaborators.Visible = false;
            }
        }
예제 #3
0
        public NUserPage(NormalUserController user, ShoppingCartController cartController, IBuyable buyable)
        {
            // My Online MSQL DataBase
            String connectionStr = "Data Source=SQL5047.site4now.net;Initial Catalog=DB_A5071D_OnlineStore;User Id=DB_A5071D_OnlineStore_admin;Password=01152160972Ah;";
            // Local MSQL DataBase
            //String connectionStr = "Data Source=DESKTOP-JEM2R23\\;Initial Catalog=OnlineStore;Integrated Security=True";

            IConnectionString connectionString = new DataBaseConnection();

            connectionString.SetConnectionString(connectionStr);
            queries         = new ShoppingCartControllerQueries(connectionString);
            this.controller = user;
            InitializeComponent();
            TuserName.Text         = controller.normalUser.Data.userName;
            Temail.Text            = controller.normalUser.Data.email;
            Tname.Text             = controller.normalUser.Data.name;
            Trole.Text             = controller.normalUser.Data.role;
            this.cartController    = cartController;
            this.buyable           = buyable;
            cartObject             = new CartItem();
            controllerStoreProduct = new StoreProductController();
        }
예제 #4
0
 public DeleteCommand()
 {
     controller             = new StoreCommandController();
     controllerStoreProduct = new StoreProductController();
 }