public newsHomePage(MainWindow mw, DatabaseConnection dbConn) { this.dbConn = dbConn; this.mw = mw; InitializeComponent(); newsText.IsReadOnly = true; }
public cartBox(MainWindow mw, DatabaseConnection conn) { this.mw = mw; InitializeComponent(); this.conn = conn; mw.cartBoxNew = this; }
public logoutBox(MainWindow mw, DatabaseConnection dbConn, string login) { this.mw = mw; this.dbConn = dbConn; this.login = login; InitializeComponent(); userNameTextBox.Content = this.login; }
public userProfile(MainWindow mw, DatabaseConnection dbConn, string login) { this.mw = mw; this.dbConn = dbConn; this.login = login; InitializeComponent(); LoadData(login); }
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"); }
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(); }
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); }
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; }
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; }
public userAdd(MainWindow mw, DatabaseConnection dbConn) { this.mw = mw; this.dbConn = dbConn; InitializeComponent(); }
public usrCtrl_addNews(MainWindow mw, DatabaseConnection dbConn) { this.mw = mw; this.dbConn = dbConn; InitializeComponent(); }
public loginHeaderBox(MainWindow mw, DatabaseConnection dbConn) { this.mw = mw; this.dbConn = dbConn; InitializeComponent(); }
public void SetConnection(DatabaseConnection conn) { this.conn = conn; }
public ProductRegister(DatabaseConnection conn) { InitializeComponent(); ucRegister.SetConnection(conn); }