コード例 #1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            bool valid = false;
            MainBranch MainBranch = new MainBranch();

            //get input from text field and pass it to login validation
            valid = branchIDcheck(txtBranchID.Text);

            if (valid == true)
            {
                MainBranch.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Invalid branch ID - please try again");
            }
        }
コード例 #2
0
        public bool branchIDcheck(string inBranchID)
        {
            bool validID = false;

            //Branch branch = new Branch();
            MainBranch main = new MainBranch();

            if (inBranchID != "")
            {
                MessageBox.Show("branches: " + main.mainArgus.Count);
                do
                {
                    foreach (Branch b in main.mainArgus)
                    {
                        if (inBranchID == b.getBranchID())
                            validID = true;
                    }
                } while (validID == false);
            }

            MessageBox.Show("valid" + Convert.ToString(validID));

            return validID;
        }
コード例 #3
0
 private void BtnBack_Click(object sender, EventArgs e)
 {
     MainBranch MainBranch = new MainBranch();
     MainBranch.Show();
     this.Hide();
 }