Exemplo n.º 1
0
        public Login()
        {
            InitializeComponent();
            mse = new MarathonSkills2015Entities();

            this.Text = "Marathon Skills 2015 - Login";

            // start the timer for no. of days left
            timer2.Start();
            // event date
            dt1 = new DateTime(2018, 9, 5);
        }
        public RegisterEvent()
        {
            InitializeComponent();

            //DB connect
            mse = new MarathonSkills2015Entities();

            // start the timer for no. of days left
            timer1.Start();
            // event date
            dt1 = new DateTime(2018, 9, 5);
            //Title text
            this.Text = "Marathon Skills 2015 - Register for an event";


            List <Charity> charityNames = mse.Charities.AsEnumerable().Where(a => a.CharityName != null).ToList();

            for (int i = 0; i < charityNames.Count; i++)
            {
                comboBox1.Items.Add(charityNames[i].CharityName);
            }
        }
        public Register()
        {
            InitializeComponent();
            mse = new MarathonSkills2015Entities();

            this.Text = "Marathon Skills 2015 - Register";

            // start the timer for no. of days left
            timer1.Start();
            // event date
            dt1 = new DateTime(2018, 9, 5);

            genderCmb.Items.Add("Male");
            genderCmb.Items.Add("Female");


            List <Country> country = mse.Countries.AsEnumerable().Where(a => a.CountryName != null).ToList();

            for (int i = 0; i < country.Count; i++)
            {
                ctryCmb.Items.Add(country[i].CountryName);
            }
        }
        public SponsorRun()
        {
            InitializeComponent();

            //DB connect
            mse = new MarathonSkills2015Entities();

            // start the timer for no. of days left
            timer1.Start();
            // event date
            dt1 = new DateTime(2018, 9, 5);
            //Title text
            this.Text = "Marathon Skills 2015 - Sponsor a runner";

            donateTxt.Text = "0";

            List <User> runnerDetails = mse.Users.AsEnumerable().Where(a => a.RoleId == "R").ToList();

            for (int i = 0; i < runnerDetails.Count; i++)
            {
                comboBox1.Items.Add(runnerDetails[i].LastName + ", " + runnerDetails[i].LastName);
            }
        }