Esempio n. 1
2
 public void TranslateGradeLevelToGradeLevelBDO(GradeLevel gl, GradeLevelBDO g)
 {
     FeeService fs = new FeeService();
     TraitService ts = new TraitService();
     g.Description = gl.Description;
     g.GradeLev = gl.GradeLev;
     g.Category = gl.Category;
     g.StudentFees = fs.ToFeeBDOList(gl.StudentFees);
     //  g.Traits = ts.ToTraitBDOList(gl.Traits);
 }
Esempio n. 2
0
 public List<GradeLevel> GetAllGradeLevels()
 {
     List<GradeLevelBDO> glBDOList = glogic.GetAllGradeLevels();
     List<GradeLevel> glList = new List<GradeLevel>();
     foreach (GradeLevelBDO glBDo in glBDOList)
     {
         GradeLevel g = new GradeLevel();
         TranslateGradeLevelBDOToeGradeLevelDTo(glBDo, g);
         glList.Add(g);
     }
     return glList;
 }    
Esempio n. 3
0
        void editor_ValueChanged(object sender, EventArgs e)
        {
            var editor = gvSubjects.ActiveEditor as RadDropDownListEditor;
            if (editor != null)
            {
                var editorElement = editor.EditorElement as RadDropDownListEditorElement;
                if (editorElement.SelectedIndex == -1)
                {

                    MessageBox.Show(this, "Please select a grade level.", "Grade Level Required");
                    gvSubjects.CancelEdit();
                }
                else
                {
                    gLevelSelected = gradeLevel[editorElement.SelectedIndex];
                    gvSubjects.EndEdit();
                }
            }
        }
Esempio n. 4
0
 private void TranslateGradeLevelBDOToeGradeLevelDTo(GradeLevelBDO glBDO, GradeLevel gradeLevel)
 {
     gradeLevel.Description = glBDO.Description;
     gradeLevel.GradeLev = glBDO.GradeLev;
     gradeLevel.Category = glBDO.Category;
 }
Esempio n. 5
0
 public GradeLevel NextGradeLevel(string grade)
 {
     GradeLevel gl = new GradeLevel();
     TranslateGradeLevelBDOToeGradeLevelDTo(glogic.NextGradeLevel(grade), gl);
     return gl;
 }
Esempio n. 6
0
        private void gvSubjects_UserAddedRow(object sender, Telerik.WinControls.UI.GridViewRowEventArgs e)
        {
            int index = this.gvSubjects.RowCount - 1;

            if (oldSubjects.Exists(x => x.GradeLevel == gLevelSelected.GradeLev) == true)
            {
                Subject returnedSub = new Subject();
                returnedSub = oldSubjects.Find(x => x.GradeLevel == gLevelSelected.GradeLev);
                subjects[index].SubjectID = returnedSub.SubjectID;
                subjects[index].SubjectCode = returnedSub.SubjectCode;
                subjects[index].MPW = returnedSub.MPW;
                oldSubjects.RemoveAll(x => x.SubjectCode == returnedSub.SubjectCode);

            }
            else
            {
                subjects[index].SubjectID = 0;
                subjects[index].SubjectCode = this.txtLearningAreaCode.Text + gLevelSelected.GradeLev;
                
            }

            subjects[index].LearningAreaCode = this.txtLearningAreaCode.Text;
            subjects[index].GradeLevel = gLevelSelected.GradeLev;
            gvSubjects.DataSource = subjects1;
            gvSubjects.DataSource = subjects;
            gLevelSelected = null;

        }
Esempio n. 7
0
        private void btnGenerate_Click(object sender, EventArgs e)
        {
            string teacherName = string.Empty;
            if (cmbSection.SelectedIndex == -1)
                return;

            if (teach != null)
            {
                teacherName = teach.LastName + ", " + teach.FirstName + " ";
                if (teach.MiddleName != string.Empty || teach.MiddleName == " ")
                {
                    teacherName = teacherName + " " + teach.MiddleName.Substring(0, 1) + ".";
                }
            }

            GradeLevel glSelected = new GradeLevel();
            glSelected = gradeLevels.Find(x => x.GradeLev == cmbGradeLevel.SelectedValue.ToString());
            string category = string.Empty;

            switch (glSelected.Category)
            {
                case 1:
                    category = "Primary";
                    break;
                case 2:
                    category = "Secondary";
                    break;
                case 3:
                    category = "Tertiary";
                    break;
                case 4:
                    category = "College";
                    break;
                default:
                    category = "";
                    break;
            }


            string gradeLevelSection = cmbGradeLevel.Text + " - " + cmbSection.Text;

            if (cmbGradeLevel.Text != string.Empty || cmbSection.Text != string.Empty
                || cmbSY.Text != string.Empty)
            {
                if (_report == "Grading Sheet")
                {
                    if (cmbReportType.Text == "Subjects")
                    {
                        frmGradingSheetTemplate1 fmGradingSheet = new frmGradingSheetTemplate1();
                        fmGradingSheet.setVars(cmbSY.Text, cmbGradeLevel.SelectedValue.ToString(), cmbSection.SelectedValue.ToString(), teacherName, gradeLevelSection, txtSection.Text);
                        fmGradingSheet.ShowDialog();
                    }

                    if (cmbReportType.Text == "Traits")
                    {
                        frmGradingSheetTrait1 fmGradingSheet = new frmGradingSheetTrait1();
                        fmGradingSheet.setVars(cmbSY.Text, cmbGradeLevel.SelectedValue.ToString(), cmbSection.SelectedValue.ToString(), teacherName, gradeLevelSection, txtSection.Text, glSelected.Category);
                        fmGradingSheet.ShowDialog();
                    }
                }

                if (_report == "Promotional")
                {
                    PromotionalTemplate1 pm1 = new PromotionalTemplate1();
                    pm1.setVars(cmbSY.Text, cmbGradeLevel.SelectedValue.ToString(), cmbSection.SelectedValue.ToString(),cmbSection.Text, teacherName, category, txtSection.Text);
                    pm1.Show();
                }
            }
        }
Esempio n. 8
0
        private void gvStudent_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
        {
            string szGradeLev = string.Empty; 
            GradeLevel gl;
            foreach (GridViewRowInfo rowInfo in gvStudent.Rows)
            {
                foreach (GridViewCellInfo cellInfo in rowInfo.Cells)
                {
                    
                    gl = new GradeLevel();

                    if (cellInfo.ColumnInfo.Name == "GradeLevel")
                    {
                        szGradeLev = string.Empty;
                        if (cellInfo.Value != null)
                            szGradeLev = cellInfo.Value.ToString();
                    }

                    if (cellInfo.ColumnInfo.Name == "GradeBeforeDC")
                    {
                        if (cellInfo.Value != null)
                            if (szGradeLev == string.Empty || szGradeLev == null)
                                szGradeLev = cellInfo.Value.ToString();
                    }


                    if (cellInfo.ColumnInfo.Name == "GradeLevelDesc")
                    {
                        if (szGradeLev == string.Empty || szGradeLev == null)
                            cellInfo.Value = string.Empty;
                        else
                        {
                            gl = gradeLevel.Find(x => x.GradeLev == szGradeLev);
                            cellInfo.Value = gl.Description;
                        }
                    }
                }
            }
        }