private void Button1_Click(object sender, EventArgs e)
 {
     if (whoLogged == 0)
     {
         userId = DBMng.validateEnrolleeWithPin(textBox1.Text);
         if (userId != 0)
         {
             this.Hide();
             EnrolleeHomePage newform = new EnrolleeHomePage(userId);
             newform.ShowDialog();
         }
         label2.Visible = true;
         textBox1.Text  = "";
     }
     else
     {
         userId = DBMng.validateHSPWithPin(textBox1.Text);
         if (userId != 0)
         {
             this.Hide();
             HSPinfoGUI info = new HSPinfoGUI(userId);
             info.ShowDialog();
         }
         label2.Visible = true;
         textBox1.Text  = "";
     }
 }
        private void Button1_Click(object sender, EventArgs e)
        {
            String name = companyNameTxtBox.Text;

            string services = "";

            foreach (object itemChecked in checkedListBox1.CheckedIndices)
            {
                services = services + itemChecked.ToString() + ",";
            }
            services = services.Remove(services.Length - 1, 1);

            string username          = textBox1.Text;
            string password          = textBox2.Text;
            String phoneNumber       = phoneNumberTxtBox.Text;
            String companyEmail      = companyEmailTxtBox.Text;
            String remittanceAddress = addressTxtBox.Text;
            String bank       = bankTxtBox.Text;
            String accountNum = accountNumTxtBox.Text;
            String routingNum = routingNumTxtBox.Text;
            String loginPIN   = loginPinTxtBox.Text;

            DBMng.insertIntohsp(name, services, username, password, companyEmail, phoneNumber, remittanceAddress, bank, accountNum, routingNum, loginPIN);

            int id = DBMng.validateHSPWithPin(loginPIN);

            this.Hide();
            HSPinfoGUI info = new HSPinfoGUI(id);

            info.ShowDialog();
        }
        private void Button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            HSPinfoGUI newform = new HSPinfoGUI(idNum);

            newform.ShowDialog();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            string username = textBox2.Text;
            string password = textBox1.Text;
            int    id       = DBMng.validateHSP(username, password);

            if (id != 0)
            {
                this.Hide();
                HSPinfoGUI info = new HSPinfoGUI(id);
                info.ShowDialog();
            }
            else
            {
                label4.Visible = true;
            }
        }