void ShowUserEnd() { if (user.UserType.Equals(0)) { UserEnd userEnd = new UserEnd(user) { StartPosition = FormStartPosition.Manual, Location = point }; //userEnd.Location = this.Location; //userEnd.StartPosition = FormStartPosition.Manual(); //userEnd.Location = this.Location; userEnd.BringToFront(); Application.Run(userEnd); } else if (user.UserType.Equals(1)) { Dashboard dashboard = new Dashboard(user) { StartPosition = FormStartPosition.Manual, Location = point }; //dashboard.Location = this.Location; dashboard.BringToFront(); Application.Run(dashboard); } }
private void BtnAddToCart_Click(object sender, EventArgs e) { if (btnCheckOut == null) { if (this.Parent.Parent.Parent.Parent is UserEnd) { UserEnd userEnd = this.Parent.Parent.Parent.Parent as UserEnd; Control[] controls = userEnd.Controls.Find("btnCheckOut", true);// as Button; if (controls.Length > 0) { if (controls[0] is Button) { btnCheckOut = controls[0] as Button; } } } } Console.WriteLine("ll"); CheckOutApp.AddItem(ItemID, Title, PriceTag); CountCartItem(); }
public void UpdateCartButton() { if (btnCheckOut == null) { if (this.Parent.Parent is UserEnd) { UserEnd userEnd = this.Parent.Parent as UserEnd; Control[] controls = userEnd.Controls.Find("btnCheckOut", true);// as Button; if (controls.Length > 0) { if (controls[0] is Button) { btnCheckOut = controls[0] as Button; } } } } btnCheckOut.Text = "( " + CheckOutApp.TotalItems() + " ) Check Out"; }
public CheckOut(User user, UserEnd userEnd) : this() { this.user = user; this.userEnd = userEnd; }
public PersonalInfo(User user, UserEnd userEnd) : this() { this.user = user; this.userEnd = userEnd; InitiateInfo(); }