Esempio n. 1
0
        //Student information subpage
        public static string studentInformation(string id)
        {
            //Check if ID is formatted correctly

            return(string.Format(
                       "<HTML><BODY>" +

                       "<head> <title>Stranahan Detention System</title> </head>" +

                       "Hello User. {0}<br>{1}<br>" +
                       "{2}" +

                       "</BODY></HTML>"

                       , DateTime.Now
                       , db.getName(id)
                       , DatabaseMain.formatHTMLTable(db.getDetentionList(id))
                       ));
        }
Esempio n. 2
0
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            if (textBox1.Text.Length == 10)
            {
                string id = textBox1.Text;
                try
                {
                    label1.Text = database.getName(id);
                    label4.Text = "Grade: " + database.getGrade(id);
                    label2.Text = "Student ID: " + id;
                    label3.Text = "Unserved: " + database.getTotalDetention(id);
                    //TODO add option to dectect if current period is study hall

                    pictureBox1.Image = Image.FromFile("IMAGES/" + database.getImageName(id));
                }
                catch (Exception)
                {
                    label1.Text = "ID Not Found";
                }

                cStudentID = textBox1.Text;
                textBox1.Clear();
            }
        }