Пример #1
0
        public void AddTeacherRegisteredSubject(string username, string SubjectName, string SubjectCode, string CreditHour)
        {
            SUBJECT subj = new SUBJECT();

            subj.Username     = username;
            subj.SubjectCode1 = SubjectCode;
            subj.SubjectName1 = SubjectName;
            subj.CreditHours1 = CreditHour;
            SUBJECTDL.TeacherSubList.Add(subj);
        }
Пример #2
0
        public List <SUBJECT> showSubjects(string username)
        {
            List <SUBJECT> sub = new List <SUBJECT>();
            SUBJECT        s   = new SUBJECT();

            foreach (SUBJECT subj in SUBJECTDL.SubjectList)
            {
                if (subj.Username == username)
                {
                    sub.Add(subj);
                }
            }
            return(sub);
        }
Пример #3
0
        public void AddSubject(string username, string subjectname, string subjectcode, string creditHour)
        {
            bool isfound = false;

            foreach (STUDENT stu in STUDENTDL.list)
            {
                if (stu.UserName1 == username)
                {
                    isfound = true;
                }
            }

            if (isfound == true)
            {
                SUBJECT sub = new SUBJECT();
                sub.Username     = username;
                sub.SubjectName1 = subjectname;
                sub.SubjectCode1 = subjectcode;
                sub.CreditHours1 = creditHour;
                SUBJECTDL.SubjectList.Add(sub);
                STUDENTDL.RegisterSubjectList.Add(sub);
            }
        }
Пример #4
0
        public bool UploadDMC(string stdname, string teachername, string grade, string subject)
        {
            bool isfound = false;

            foreach (SUBJECT s in SUBJECTDL.SubjectList)
            {
                if (s.Username == stdname)
                {
                    isfound = true;
                }
            }
            DMC     d   = new DMC();
            SUBJECT sub = new SUBJECT();

            if (isfound == true)
            {
                d.StudentName1 = stdname;
                d.TeacherName1 = teachername;
                d.Subject      = subject;
                d.Grade        = grade;
                DMCDL.dmc.Add(d);
            }
            return(isfound);
        }