private void inventoryMenuItem_Click(object sender, EventArgs e) { InventoryForm inventoryForm = new InventoryForm(); inventoryForm.MdiParent = this; inventoryForm.Show(); }
private void InventoryButton_Click(object sender, EventArgs e) { if (inventory == null || !inventory.Visible) { inventory = new InventoryForm(Character, ForCharacter, ForPet); inventory.Show(); } inventory.ShowAll(); }
public void NextForm() { if (type == MenuForm.typeFolio.unloading) { readerUnloading.Show(FolioBox.Text); } else { readerLoading.Show(FolioBox.Text); } }
private void NextButton_Click(object sender, EventArgs e) { if (FolioBox.TextLength != 0) { if (type == MenuForm.typeFolio.unloading) { readerUnloading.Show(FolioBox.Text); } else { readerLoading.Show(FolioBox.Text); } } else { MessageBox.Show("Indique un folio", "Error", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1); } }
private void inventoryToolStripMenuItem_Click(object sender, EventArgs e) { InventoryForm inventoryForm = new InventoryForm(); inventoryForm.Show(); }
private void btnLogIn_Click(object sender, EventArgs e) { if (textBoxUserID.Text == "" || textBoxUserPassword.Text == "") { MessageBox.Show("Please enter UserID and Password"); return; } try { SqlConnection connect = UtilityDB.ConnectDB(); SqlCommand cmd = new SqlCommand(); cmd.Connection = connect; cmd.CommandText = "Select * from Users where userId = @userId and password = @password"; cmd.Parameters.AddWithValue("@userId", textBoxUserID.Text); cmd.Parameters.AddWithValue("@password", textBoxUserPassword.Text); SqlDataAdapter adapt = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); adapt.Fill(ds); connect.Close(); if (textBoxUserID.Text == "1111" && textBoxUserPassword.Text == "henry1234") { MessageBox.Show("Login Successful!"); this.Hide(); ManagerForm mis = new ManagerForm(); mis.Show(); } else if (textBoxUserID.Text == "1112" && textBoxUserPassword.Text == "thomas1234") { MessageBox.Show("Login Successful!"); this.Hide(); SalesManager smf = new SalesManager(); smf.Show(); } /*else if (textBoxUserID.Text == "4000" && textBoxUserPassword.Text == "kim4000") * { * MessageBox.Show("Login Successful!"); * this.Hide(); * AccountantForm af = new AccountantForm(); * af.Show(); * }*/ else if (textBoxUserID.Text == "1113" && textBoxUserPassword.Text == "peter1234") { MessageBox.Show("Login Successful!"); this.Hide(); InventoryForm mf = new InventoryForm(); mf.Show(); } else if (textBoxUserID.Text == "1114" && textBoxUserPassword.Text == "mary1234") { MessageBox.Show("Login Successful!"); this.Hide(); OrderForm of = new OrderForm(); of.Show(); } else if (textBoxUserID.Text == "1115" && textBoxUserPassword.Text == "jennifer1234") { MessageBox.Show("Login Successful!"); this.Hide(); OrderForm of = new OrderForm(); of.Show(); } else { MessageBox.Show("UserId or Password invalid!"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }