Exemple #1
0
        public void LoadStudents()
        {
            IGradeLevelService glService = new GradeLevelService();
            gradeLevel = new List<GradeLevel>(glService.GetAllGradeLevels());
            if (gradeLevel.Count > 0)
                gradeLevel[0].Description = "None";

            IGradeSectionService sectionService = new GradeSectionService();
            sections = new List<GradeSection>(sectionService.GetAllGradeSections());

            IRegistrationService registrationService = new RegistrationService();
            RegisteredStudents= new List<string>(registrationService.GetEnrolledStudents(GlobalClass.currentsy));
            IStudentService studentService = new StudentService();
            string message = String.Empty;
            try
            {
                var students = studentService.GetAllStudents();
                studentList = new List<Student>(students);
                gvStudent.DataSource = students;
                gvStudent.Refresh();

                if (gvStudent.RowCount != 0)
                    gvStudent.Rows[0].IsSelected = true;
            }
            catch (Exception ex)
            {
                message = "Error Loading Student List";
                MessageBox.Show(ex.ToString());
            }

        }
Exemple #2
0
        private void frmStudentDetails_Load(object sender, EventArgs e)
        {
            pvStudent.SelectedPage = pvStudent.Pages[0];

            IGradeLevelService glService = new GradeLevelService();
            gradeLevel = new List<GradeLevel>(glService.GetAllGradeLevels());
            if (gradeLevel.Count > 0)
                gradeLevel[0].Description = "None";

            cmbGradeLevel.DataSource = gradeLevel;
            cmbGradeLevel.ValueMember = "GradeLev";
            cmbGradeLevel.DisplayMember = "Description";

          
            if (Op.Equals("new"))
            {
                GenerateStudentID();
                cmbGradeLevel.SelectedIndex = 0;
                btnEditID.Visible = false;
            }

            if (Op.Equals("edit"))
            {
                SetFields();
            }
        }
Exemple #3
0
        public Boolean UpdateStudentCharacters(Trait tbdo)
        {
            SchoolYear sy = new SchoolYear();

            sy = GetCurrentSY();

            IGradeLevelService gradeLevelService  = new GradeLevelService();
            List <GradeLevel>  gradeLevelList     = new List <GradeLevel>(gradeLevelService.GetAllGradeLevels());
            List <GradeLevel>  gradeLevelCategory = new List <GradeLevel>();

            gradeLevelCategory = gradeLevelList.FindAll(x => x.Category == tbdo.Category);

            Boolean ret = false;

            List <string> studentIDs = new List <string>();

            foreach (GradeLevel gl in gradeLevelCategory)
            {
                studentIDs.AddRange(GetEnrolledStudentsforNewTraits(gl.GradeLev, sy.SY));
            }

            foreach (string studentID in studentIDs)
            {
                StudentEnrollment se = new StudentEnrollment();
                se = GetEnrolledStudent(studentID, sy.SY);
                StudentTrait st = new StudentTrait
                {
                    StudentSY           = se.StudentSY,
                    TraitsID            = tbdo.TraitsID,
                    StudentEnrTraitCode = se.StudentSY + tbdo.TraitsID,
                    GradeSectionCode    = (int)se.GradeSectionCode,
                    LockFirst           = false,
                    LockSecond          = false,
                    LockFourth          = false,
                    LockThird           = false
                };
                string          message = string.Empty;
                StudentTraitBDO stb     = new StudentTraitBDO();
                NewTraitsTranslateStuTraitsToStuTraitsBDO(st, stb);
                ret = stl.AddStudentCharacters(stb, ref message);
            }
            return(ret);
        }
Exemple #4
0
        public void TranslateFeeBDOToFee(FeeBDO fbdo, Fee f)
        {
            GradeLevelService gService = new GradeLevelService();
            if (fbdo != null)
            {
                f.Deactivated = fbdo.Deactivated;
                f.FeeID = fbdo.FeeID;
                f.FeeDescription = fbdo.FeeDescription;
                fbdo.NumPay = fbdo.NumPay ?? 0;
                f.NumPay = (int)fbdo.NumPay;
                fbdo.DiscountFullPay = fbdo.DiscountFullPay ?? 0;
                f.DiscountFullPay = (float)fbdo.DiscountFullPay;
                f.Amount = fbdo.Amount;
                //gService.
                f.GradeLev = gService.GetGradeLevel(fbdo.GradeLevel);
                f.GradeLevel = fbdo.GradeLevel;
                f.SYImplemented = fbdo.SYImplemented;
            }

        }
Exemple #5
0
        public void TranslateFeeBDOToFee(FeeBDO fbdo, Fee f)
        {
            GradeLevelService gService = new GradeLevelService();

            if (fbdo != null)
            {
                f.Deactivated        = fbdo.Deactivated;
                f.FeeID              = fbdo.FeeID;
                f.FeeDescription     = fbdo.FeeDescription;
                fbdo.NumPay          = fbdo.NumPay ?? 0;
                f.NumPay             = (int)fbdo.NumPay;
                fbdo.DiscountFullPay = fbdo.DiscountFullPay ?? 0;
                f.DiscountFullPay    = (float)fbdo.DiscountFullPay;
                f.Amount             = fbdo.Amount;
                //gService.
                f.GradeLev      = gService.GetGradeLevel(fbdo.GradeLevel);
                f.GradeLevel    = fbdo.GradeLevel;
                f.SYImplemented = fbdo.SYImplemented;
            }
        }
Exemple #6
0
        public List <GradeLevel> GetAllGradeLevels()
        {
            GradeLevelService gs = new GradeLevelService();

            return(gs.GetAllGradeLevels());
        }
Exemple #7
0
 public List<GradeLevel> GetAllGradeLevels()
 {
     GradeLevelService gs = new GradeLevelService();
     return gs.GetAllGradeLevels();
 }
Exemple #8
0
        private void frmManageSubject_Load(object sender, EventArgs e)
        {
            
            ILearningAreaService laService = new LearningAreaService();
            IGradeLevelService glService = new GradeLevelService();
            gradeLevel = new List<GradeLevel>(glService.GetAllGradeLevels());
            

            colGradeLevel = new GridViewComboBoxColumn("GradeLevel");            
            colGradeLevel.HeaderText = "Grade Level";
            colGradeLevel.FieldName = "GradeLevel";
            colGradeLevel.ValueMember = "GradeLev";
            colGradeLevel.DisplayMember = "Description";
            colGradeLevel.Width = 110;

            colGradeLevel.DataSource = gradeLevel;

            gvSubjects.Columns.Add(colGradeLevel);


            if (Op.Equals("edit"))
            {
                SetFields();
                SetSubjectGrid();
                this.Size = new Size(812, 571);
            }

            if (Op.Equals("new"))
            {
                BindSubjectGrid();
                gvSubjects.Enabled = false; 
                btnSave.Enabled = false;
                this.Size = new Size(812, 209);
            }
        }
        public Boolean UpdateStudentCharacters(Trait tbdo)
        {
            SchoolYear sy = new SchoolYear();
            sy = GetCurrentSY();

            IGradeLevelService gradeLevelService = new GradeLevelService();
            List<GradeLevel> gradeLevelList = new List<GradeLevel>(gradeLevelService.GetAllGradeLevels());
            List<GradeLevel> gradeLevelCategory = new List<GradeLevel>();
            gradeLevelCategory = gradeLevelList.FindAll(x => x.Category == tbdo.Category);

            Boolean ret = false;

            List<string> studentIDs = new List<string>();
            foreach (GradeLevel gl in gradeLevelCategory)
            {
                studentIDs.AddRange(GetEnrolledStudentsforNewTraits(gl.GradeLev, sy.SY));
            }

            foreach (string studentID in studentIDs)
            {
                StudentEnrollment se = new StudentEnrollment();
                se = GetEnrolledStudent(studentID, sy.SY);
                StudentTrait st = new StudentTrait
                {
                    StudentSY = se.StudentSY,
                    TraitsID = tbdo.TraitsID,
                    StudentEnrTraitCode = se.StudentSY + tbdo.TraitsID,
                    GradeSectionCode = (int)se.GradeSectionCode,
                    LockFirst = false,
                    LockSecond = false,
                    LockFourth = false,
                    LockThird = false
                };
                string message = string.Empty;
                StudentTraitBDO stb = new StudentTraitBDO();
                NewTraitsTranslateStuTraitsToStuTraitsBDO(st, stb);
                ret = stl.AddStudentCharacters(stb, ref message);
            }
            return ret;

        }
Exemple #10
0
        private String getNext(String g)
        {
            GradeLevelService gls = new GradeLevelService();
            GradeLevel grade = gls.NextGradeLevel(g);
            return grade.GradeLev;


            //switch (g)
            //{
            //    case "0":
            //        return "N";
            //    case "N":
            //        return "K1";
                    
            //    case "K1":
            //        return "K2";
                    
            //    case "K2":
            //        return "1";
                    
            //    case "1":
            //        return "2";
                    
            //    case "2":
            //        return "3";
                    
            //    case "3":
            //        return "4";
                    
            //    case "4":
            //        return "5";
                    
            //    case "5":
            //        return "6";
            //    case "6":
            //        return "7";
                    
            //    case "8":
            //        return "9";
                    
            //    case "9":
            //        return "10";
            //    default: return null;

            //}
        }