private void SubjectPerSemesterGrid_PointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
        {
            var physicalPoint = e.GetCurrentPoint(sender as RadDataGrid);
            var point         = new Point {
                X = physicalPoint.Position.X, Y = physicalPoint.Position.Y
            };

            row = (SubjectAndGrade)(sender as RadDataGrid).HitTestService.RowItemFromPoint(point);
            var cell = (sender as RadDataGrid).HitTestService.CellInfoFromPoint(point);
        }
Beispiel #2
0
        public static ObservableCollection <SubjectAndGrade> GetTabbedPage(ObservableCollection <SubjectWithGrade> collection)
        {
            ObservableCollection <SubjectAndGrade> data = new ObservableCollection <SubjectAndGrade>();

            if (collection != null)
            {
                foreach (var item in collection)
                {
                    int    id     = item.Subject.Id;
                    string name   = item.Subject.Name;
                    string code   = item.Subject.Code;
                    int    credit = item.Subject.Credit;
                    int    recommendedSemester  = item.Subject.RecommendedSemester;
                    string responsibleProfessor = item.Subject.ResponsibleProfessor;

                    int  studentID          = item.Grade.StudentID;
                    int  subjectID          = item.Grade.SubjectID;
                    int  enrollmentSemester = item.Grade.EnrollmentSemester;
                    bool signature          = item.Grade.Signature;
                    bool passed             = item.Grade.Passed;
                    int  receivedGrade      = item.Grade.ReceivedGrade;

                    SubjectAndGrade temp = new SubjectAndGrade(id, name, code, credit, recommendedSemester, responsibleProfessor, studentID, subjectID, enrollmentSemester, signature, passed, receivedGrade);

                    data.Add(temp);
                }

                return(data);
            }

            return(data);

            //foreach (var item in collection)
            //{
            //    int id = item.Subject.Id;
            //    string name = item.Subject.Name;
            //    string code = item.Subject.Code;
            //    int credit = item.Subject.Credit;
            //    int recommendedSemester = item.Subject.RecommendedSemester;
            //    string responsibleProfessor = item.Subject.ResponsibleProfessor;

            //    int studentID = item.Grade.StudentID;
            //    int subjectID = item.Grade.SubjectID;
            //    int enrollmentSemester = item.Grade.EnrollmentSemester;
            //    bool signature = item.Grade.Signature;
            //    bool passed = item.Grade.Passed;
            //    int receivedGrade = item.Grade.ReceivedGrade;

            //    SubjectAndGrade temp = new SubjectAndGrade(id, name,code,credit,recommendedSemester, responsibleProfessor,studentID,subjectID,enrollmentSemester,signature,passed,receivedGrade);

            //    data.Add(temp);
            //}

            //return data;
        }