private void ButRefreshmetroButton_Click(object sender, EventArgs e) { this.Close(); BuyerForm ob = new BuyerForm(); ob.Show(); }
override protected void homeToolStripMenuItem_Click(object sender, EventArgs e) { this.Hide(); BuyerForm ob = new BuyerForm(); ob.Show(); }
private void metroButton2_Click(object sender, EventArgs e) { this.Hide(); BuyerForm ob = new BuyerForm(); ob.Show(); }
private void LoginmetroButton_Click(object sender, EventArgs e) { UserInfo.UserID = int.Parse(TxtUsernamemetroTextBox.Text); UserInfo.Password = TxtPasswordmetroTextBox.Text; try { if (ComUserTypemetroComboBox.Text == "Buyer") { if (EventHandler.LoginCheck(UserInfo.UserID, UserInfo.Password, "Buyer")) { this.Hide(); BuyerForm ob = new BuyerForm(); ob.Show(); MetroMessageBox.Show(this, "Log in Success As a" + ComUserTypemetroComboBox.Text + "!!!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else if (ComUserTypemetroComboBox.Text == "Seller") { if (EventHandler.LoginCheck(UserInfo.UserID, UserInfo.Password, "Seller")) { this.Hide(); SellerForm ob = new SellerForm(); ob.Show(); MetroMessageBox.Show(this, "Log in Success As a" + ComUserTypemetroComboBox.Text + "!!!!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } catch (Exception ex) { MetroMessageBox.Show(this, "Login Fail!!!!", "Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error); } }
public static void showItemList(BuyerForm ob) { int i = 0; int end1 = 3; DBDataContext db = new DBDataContext(); Item it = new Item(); var cat = from p in db.Items select p; foreach (var x in cat) { ob.AddProductlist(i, end1, x.Item_name, x.Unit_price.ToString(), x.Category.Category_name, x.Item_id.ToString(), x.Image_path); end1 += 123; i++; } }