예제 #1
0
 public newsHomePage(MainWindow mw, DatabaseConnection dbConn)
 {
     this.dbConn = dbConn;
     this.mw = mw;
     InitializeComponent();
     newsText.IsReadOnly = true;
 }
예제 #2
0
        public cartBox(MainWindow mw, DatabaseConnection conn)
        {
            this.mw = mw;
            InitializeComponent();
            this.conn = conn;
            mw.cartBoxNew = this;

        }
예제 #3
0
 public logoutBox(MainWindow mw, DatabaseConnection dbConn, string login)
 {
     this.mw = mw;
     this.dbConn = dbConn;
     this.login = login;
     InitializeComponent();
     userNameTextBox.Content = this.login;
 }
예제 #4
0
 public userProfile(MainWindow mw, DatabaseConnection dbConn, string login)
 {
     this.mw = mw;
     this.dbConn = dbConn;
     this.login = login;
     InitializeComponent();
     LoadData(login);
 }
예제 #5
0
        public MainWindow()
        {
            InitializeComponent();
            dbConn = new DatabaseConnection("46.109.120.29", "3306", "shop", "csharp", "FSzWUcCcm8fAsdJe");

            //UserRegister("da", "da", "da32", "da", "da", "da");
            //ProductRegister("da", "da", "2008-11-11", "2008-11-11", 2, 2, "da", "da", "da");
            //PaymentRegister("2008-11-11", "da", "da", "da", "2008-11-11", 12);
            //AddressRegister("da", "da", "da2", "da", "da", "da");
        }
예제 #6
0
 public usrCtrl_CartInfo(string name, List<Items> itemList, List<ProductClass> productList, DatabaseConnection conn, cartBox cB)
 {
     InitializeComponent();
     usernameTmp = name;
     this.itemList = itemList;
     this.productList = productList;
     this.conn = conn;
     this.cB = cB;
     checkProductList();
 }
예제 #7
0
        public wndw_OrderHistory(DatabaseConnection conn, string username)
        {
            InitializeComponent();
            this.conn = conn;
            userID = GetUserID(username);
            dataGrid.IsReadOnly = true;

            list = conn.ReadData("SELECT Date, Orders.ID FROM Orders WHERE Orders.Users_ID = " + userID);
            int counter = 1;
            for (int i = 0; i < list.Count; i += 2)
            {
                comboBox.Items.Add(counter + ". " + list[i].Substring(0, list[i].IndexOf(" ")));
                counter++;
            }
        }
        public void Init(DatabaseConnection conn)
        {
            this.conn = conn;
            shipmnetsList = new List<Shipment>();

            List<string> list = conn.ReadData("select ID, Name, Price from Shipping_methods");
            for (int i = 0; i < list.Count; i += 3)
            {
                decimal result = decimal.Parse(list[i + 2], CultureInfo.InvariantCulture);
                Shipment s = new Shipment(Convert.ToInt32(list[i]), list[i + 1], result);
                shipmnetsList.Add(s);
            }
            foreach (Shipment s in shipmnetsList)
                comboBox.Items.Add(s.Name);
        }
예제 #9
0
        public wndw_Product_Buy(DatabaseConnection conn, string username, List<Items> itemList, string sum, cartBox cB)
        {
            InitializeComponent();
            this.conn = conn;
            this.username = username;
            this.itemList = itemList;
            this.sum = sum;
            this.cB = cB;

            ctrlShipping.Init(conn);

            ctrlAddress.Visibility = Visibility.Hidden;
            ctrlPayment.Visibility = Visibility.Hidden;
            button1.Visibility = Visibility.Hidden;

            payment = null;
            address = null;
            shipment = null;

            clickCounter = 0;
        }
예제 #10
0
        public MainWindow()
        {
            InitializeComponent();
            dbConn = new DatabaseConnection("46.109.120.29", "3306", "shop", "csharp", "FSzWUcCcm8fAsdJe");

            drawNews();
            startPageButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
            ReadData();

            iI = new itemInformation(this, productList);

            stackPanelList.Add(sp1);
            stackPanelList.Add(sp2);
            stackPanelList.Add(sp3);
            stackPanelList.Add(sp4);
            stackPanelList.Add(sp5);
            stackPanelList.Add(sp6);
            stackPanelList.Add(sp7);
            stackPanelList.Add(sp8);
            stackPanelList.Add(sp9);
            stackPanelList.Add(sp10);

            // Login Register
            loginHeaderBox lHB = new loginHeaderBox(this, dbConn);
            login_logout_StackPanel.Children.Add(lHB);

            labelSort1.Visibility = Visibility.Hidden;
            labelSort2.Visibility = Visibility.Hidden;
            labelSort3.Visibility = Visibility.Hidden;
            labelSort4.Visibility = Visibility.Hidden;
            labelSort5.Visibility = Visibility.Hidden;
            button.Visibility = Visibility.Hidden;
            button1.Visibility = Visibility.Hidden;
            button2.Visibility = Visibility.Hidden;
            button3.Visibility = Visibility.Hidden;
            button4.Visibility = Visibility.Hidden;
            button5.Visibility = Visibility.Hidden;
            button6.Visibility = Visibility.Hidden;
            textBox.Visibility = Visibility.Hidden;
        }
예제 #11
0
 public userAdd(MainWindow mw, DatabaseConnection dbConn)
 {
     this.mw = mw;
     this.dbConn = dbConn;
     InitializeComponent();
 }
예제 #12
0
 public usrCtrl_addNews(MainWindow mw, DatabaseConnection dbConn)
 {
     this.mw = mw;
     this.dbConn = dbConn;
     InitializeComponent();
 }
예제 #13
0
 public loginHeaderBox(MainWindow mw, DatabaseConnection dbConn)
 {
     this.mw = mw;
     this.dbConn = dbConn;
     InitializeComponent();
 }
예제 #14
0
 public void SetConnection(DatabaseConnection conn)
 {
     this.conn = conn;
 }
예제 #15
0
 public ProductRegister(DatabaseConnection conn)
 {
     InitializeComponent();
     ucRegister.SetConnection(conn);
 }