public UpdateLeagueStanding(FAHomeScreen _ParentForm)
 {
     InitializeComponent();
     ParentForm_   = _ParentForm;
     controllerobj = new Controller();
     UpdateComboBoxes();
 }
 public AddStaffForm(FAHomeScreen _ParentForm)
 {
     InitializeComponent();
     ParentForm_   = _ParentForm;
     controllerobj = new Controller();
     FA_ID         = ParentForm_.GetFA_ID();
 }
Ejemplo n.º 3
0
 public RetireForm(FAHomeScreen _ParentForm)
 {
     InitializeComponent();
     ParentForm_   = _ParentForm;
     controllerobj = new Controller();
     UpdateComboBoxes();
 }
        private void Login(int ID)
        {
            string hashedPass = Football_Scouting_System.Form1.ComputeSha256Hash(passTxtBox.Text);
            string id         = userNameTxtbox.Text;

            //Check FAs
            if (objcontroller.LogInFA(ID, hashedPass) == 1)
            {
                try
                {
                    FA.FAHomeScreen f = new FA.FAHomeScreen(this, ID);
                    f.Show();
                    this.Hide();
                }
                catch
                {
                    MessageBox.Show("An unexpected error has occured");
                }
            }
            //Check Clubs
            else if (objcontroller.LogInClub(ID, hashedPass) == 1)
            {
                try
                {
                    Club.ClubHomeScreen C = new Club.ClubHomeScreen(this, ID);
                    C.Show();
                    this.Hide();
                }
                catch
                {
                    MessageBox.Show("An unexpected error has occured");
                }
            }
            //Check Scouts
            else if (objcontroller.LogInScout(ID, hashedPass) == 1)
            {
                try
                {
                    Scout.ScoutHomeScreen s = new Scout.ScoutHomeScreen(this, ID);
                    s.Show();
                    this.Hide();
                }
                catch
                {
                    MessageBox.Show("An unexpected error has occured");
                }
            }
            //Check journalist
            else if (objcontroller.LogInJournalist(ID, hashedPass) == 1)
            {
                try
                {
                    Journalist.Journalist j = new Journalist.Journalist(this, ID);
                    j.Show();
                    this.Hide();
                }
                catch
                {
                    MessageBox.Show("An unexpected error has occured");
                }
            }
            //else invalid
            else
            {
                MessageBox.Show("Invalid ID or Password! Please re-enter a valid one or enter as guest!");
            }
        }
Ejemplo n.º 5
0
 public SigningsForm(FAHomeScreen _ParentForm)
 {
     InitializeComponent();
     ParentForm_   = _ParentForm;
     controllerobj = new Controller();
 }
 public AddLeagueForm(FAHomeScreen _ParentForm)
 {
     InitializeComponent();
     ParentForm_   = _ParentForm;
     controllerobj = new Controller();
 }
Ejemplo n.º 7
0
 public ChangeFAPasswordForm(FAHomeScreen _ParentForm)
 {
     InitializeComponent();
     ParentForm_   = _ParentForm;
     controllerobj = new Controller();
 }
Ejemplo n.º 8
0
 public UpdateFA(FAHomeScreen _ParentForm)
 {
     InitializeComponent();
     ParentForm_   = _ParentForm;
     controllerobj = new Controller();
 }