Ejemplo n.º 1
0
        private void inventoryMenuItem_Click(object sender, EventArgs e)
        {
            InventoryForm inventoryForm = new InventoryForm();

            inventoryForm.MdiParent = this;
            inventoryForm.Show();
        }
Ejemplo n.º 2
0
 private void InventoryButton_Click(object sender, EventArgs e)
 {
     if (inventory == null || !inventory.Visible)
     {
         inventory = new InventoryForm(Character, ForCharacter, ForPet);
         inventory.Show();
     }
     inventory.ShowAll();
 }
Ejemplo n.º 3
0
 public void NextForm()
 {
     if (type == MenuForm.typeFolio.unloading)
     {
         readerUnloading.Show(FolioBox.Text);
     }
     else
     {
         readerLoading.Show(FolioBox.Text);
     }
 }
Ejemplo n.º 4
0
 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);
     }
 }
Ejemplo n.º 5
0
        private void inventoryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            InventoryForm inventoryForm = new InventoryForm();

            inventoryForm.Show();
        }
Ejemplo n.º 6
0
        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);
            }
        }