示例#1
0
        private void cbEditor_ValueChanged(object sender, EventArgs e)
        {
            addedCurrSub = new CurriculumSubject();
            int i = gvSubjects.CurrentRow.Index;
            RadCheckBoxEditor cbEditor = sender as RadCheckBoxEditor;

            if ((Telerik.WinControls.Enumerations.ToggleState)cbEditor.Value == Telerik.WinControls.Enumerations.ToggleState.On)
            {
                subDetails[i].Added          = true;
                addedCurrSub.Academic        = currSub[i].Academic;
                addedCurrSub.CurrDescription = txtDescription.Text;
                if (chkCurrent.CheckState == 0)
                {
                    addedCurrSub.CurrentCurr = false;
                }
                else
                {
                    addedCurrSub.CurrentCurr = true;
                }
                addedCurrSub.CurriculumCode     = txtCurrCode.Text;
                addedCurrSub.CurrSubCode        = txtCurrCode.Text.ToString() + currSub[i].SubjectCode;
                addedCurrSub.Deactivated        = false;
                addedCurrSub.GradeLevel         = currSub[i].GradeLevel;
                addedCurrSub.LearningAreaCode   = currSub[i].LearningAreaCode;
                addedCurrSub.RatePerUnit        = currSub[i].RatePerUnit;
                addedCurrSub.SubjectCode        = currSub[i].SubjectCode;
                addedCurrSub.Subj               = currSub[i].Subj;
                addedCurrSub.SubjectDescription = currSub[i].SubjectDescription;
                addedCurrSub.Units              = currSub[i].Units;

                currSub1.Add(addedCurrSub);
            }
            else if ((Telerik.WinControls.Enumerations.ToggleState)cbEditor.Value == Telerik.WinControls.Enumerations.ToggleState.Off)
            {
                subDetails[i].Added          = false;
                addedCurrSub.Academic        = currSub[i].Academic;
                addedCurrSub.CurrDescription = txtDescription.Text;
                if (chkCurrent.CheckState == 0)
                {
                    addedCurrSub.CurrentCurr = false;
                }
                else
                {
                    addedCurrSub.CurrentCurr = true;
                }
                addedCurrSub.CurriculumCode     = txtCurrCode.Text;
                addedCurrSub.CurrSubCode        = txtCurrCode.Text.ToString() + currSub[i].SubjectCode;
                addedCurrSub.Deactivated        = false;
                addedCurrSub.GradeLevel         = currSub[i].GradeLevel;
                addedCurrSub.LearningAreaCode   = currSub[i].LearningAreaCode;
                addedCurrSub.RatePerUnit        = currSub[i].RatePerUnit;
                addedCurrSub.SubjectCode        = currSub[i].SubjectCode;
                addedCurrSub.Subj               = currSub[i].Subj;
                addedCurrSub.SubjectDescription = currSub[i].SubjectDescription;
                addedCurrSub.Units              = currSub[i].Units;

                currSub1.Remove(addedCurrSub);
            }
            addedCurrSub = null;
        }
示例#2
0
 private void TranslateCurriculumSubjectToCurriculumSubjectBDO(CurriculumSubject cs, CurriculumSubjectBDO csbdo)
 {
     csbdo.CurriculumCode       = cs.CurriculumCode;
     csbdo.CurrSubCode          = cs.CurrSubCode;
     csbdo.Deactivated          = cs.Deactivated;
     csbdo.CurriculumSubjectsID = cs.CurriculumSubjectsID;
     csbdo.SubjectCode          = cs.SubjectCode;
 }
示例#3
0
        private void cbEditor_ValueChanged(object sender, EventArgs e)
        {
            addedCurrSub = new CurriculumSubject();
            int i = gvSubjects.CurrentRow.Index;
            RadCheckBoxEditor cbEditor = sender as RadCheckBoxEditor;
            if ((Telerik.WinControls.Enumerations.ToggleState)cbEditor.Value == Telerik.WinControls.Enumerations.ToggleState.On)
            {
                subDetails[i].Added = true;
                addedCurrSub.Academic = currSub[i].Academic;
                addedCurrSub.CurrDescription = txtDescription.Text;
                if (chkCurrent.CheckState == 0)
                    addedCurrSub.CurrentCurr = false;
                else
                    addedCurrSub.CurrentCurr = true;
                addedCurrSub.CurriculumCode = txtCurrCode.Text;
                addedCurrSub.CurrSubCode = txtCurrCode.Text.ToString() + currSub[i].SubjectCode;
                addedCurrSub.Deactivated = false;
                addedCurrSub.GradeLevel = currSub[i].GradeLevel;
                addedCurrSub.LearningAreaCode = currSub[i].LearningAreaCode;
                addedCurrSub.RatePerUnit = currSub[i].RatePerUnit;
                addedCurrSub.SubjectCode = currSub[i].SubjectCode;
                addedCurrSub.Subj = currSub[i].Subj;
                addedCurrSub.SubjectDescription = currSub[i].SubjectDescription;
                addedCurrSub.Units = currSub[i].Units;

                currSub1.Add(addedCurrSub);

            }
            else if ((Telerik.WinControls.Enumerations.ToggleState)cbEditor.Value == Telerik.WinControls.Enumerations.ToggleState.Off)
            {
                subDetails[i].Added = false;
                addedCurrSub.Academic = currSub[i].Academic;
                addedCurrSub.CurrDescription = txtDescription.Text;
                if (chkCurrent.CheckState == 0)
                    addedCurrSub.CurrentCurr = false;
                else
                    addedCurrSub.CurrentCurr = true;
                addedCurrSub.CurriculumCode = txtCurrCode.Text;
                addedCurrSub.CurrSubCode = txtCurrCode.Text.ToString() + currSub[i].SubjectCode;
                addedCurrSub.Deactivated = false;
                addedCurrSub.GradeLevel = currSub[i].GradeLevel;
                addedCurrSub.LearningAreaCode = currSub[i].LearningAreaCode;
                addedCurrSub.RatePerUnit = currSub[i].RatePerUnit;
                addedCurrSub.SubjectCode = currSub[i].SubjectCode;
                addedCurrSub.Subj = currSub[i].Subj;
                addedCurrSub.SubjectDescription = currSub[i].SubjectDescription;
                addedCurrSub.Units = currSub[i].Units;

                currSub1.Remove(addedCurrSub);

            }
            addedCurrSub = null;
        }
示例#4
0
        public List <CurriculumSubject> GetCurriculumSubjects(string currCode)
        {
            List <CurriculumSubject> csList = new List <CurriculumSubject>();

            foreach (CurriculumSubjectBDO cb in clogic.GetAllCurriculumSubjects(currCode))
            {
                CurriculumSubject cs = new CurriculumSubject();
                TranslateCurriculumSubjectBDOToCurriculumSubject(cb, cs);
                csList.Add(cs);
            }
            return(csList);
        }
示例#5
0
        private List <CurriculumSubject> ToCurriculumSubjectList(List <CurriculumSubjectBDO> csList)
        {
            List <CurriculumSubject> csbList = new List <CurriculumSubject>();

            foreach (CurriculumSubjectBDO cs in csList)
            {
                CurriculumSubject csbdo = new CurriculumSubject();
                TranslateCurriculumSubjectBDOToCurriculumSubject(cs, csbdo);
                csbList.Add(csbdo);
            }
            return(csbList);
        }
示例#6
0
        public List <CurriculumSubject> GetAllSubjectDetails()
        {
            SubjectService           ss     = new SubjectService();
            List <CurriculumSubject> csList = new List <CurriculumSubject>();
            List <Subject>           sList  = new List <Subject>(ss.GetAllSubjects());

            foreach (Subject s in sList)
            {
                CurriculumSubject cs = new CurriculumSubject();
                TranslateCurrSub(s, cs);
                csList.Add(cs);
            }
            return(csList);
        }
示例#7
0
        public List <CurriculumSubject> GetAllSubjectsOfGradeLevel(string gradeLevel)
        {
            SubjectService           ss     = new SubjectService();
            List <CurriculumSubject> csList = new List <CurriculumSubject>();
            List <Subject>           sList  = new List <Subject>();

            sList = ss.GetAllSubjectsOfGradeLevel(gradeLevel);
            foreach (Subject s in sList)
            {
                CurriculumSubject cs = new CurriculumSubject();
                TranslateCurrSub(s, cs);
                csList.Add(cs);
            }
            return(csList);
        }
示例#8
0
        public void TranslateCurrSub(Subject s, CurriculumSubject cs)
        {
            LearningAreaService las  = new LearningAreaService();
            LearningArea        la   = new LearningArea();
            SubjectService      ss   = new SubjectService();
            Subject             subj = new Subject();

            subj                  = ss.GetSubject(s.SubjectCode);
            cs.Subj               = s;
            cs.SubjectCode        = s.SubjectCode;
            la                    = las.GetLearningArea(s.LearningAreaCode);
            cs.Academic           = la.Academic;
            cs.RatePerUnit        = la.RatePerUnit;
            cs.Units              = la.Units;
            cs.SubjectDescription = subj.Description;
            cs.GradeLevel         = subj.GradeLevel;
            cs.LearningAreaCode   = subj.LearningAreaCode;
        }
示例#9
0
        private void TranslateCurriculumSubjectBDOToCurriculumSubject(CurriculumSubjectBDO cs, CurriculumSubject csbdo)
        {
            Subject             sbdo = new Subject();
            SubjectService      ss   = new SubjectService();
            LearningAreaService las  = new LearningAreaService();
            LearningArea        la   = new LearningArea();

            csbdo.CurriculumSubjectsID = cs.CurriculumSubjectsID;
            csbdo.CurriculumCode       = cs.CurriculumCode;
            csbdo.CurrSubCode          = cs.CurrSubCode;
            csbdo.Deactivated          = cs.Deactivated;
            ss.TranslateSubjectBDOToSubject(cs.Sub, sbdo);
            csbdo.Subj        = sbdo;
            csbdo.SubjectCode = cs.SubjectCode;
            la                       = las.GetLearningArea(sbdo.LearningAreaCode);
            csbdo.Academic           = la.Academic;
            csbdo.RatePerUnit        = la.RatePerUnit;
            csbdo.Units              = la.Units;
            csbdo.SubjectDescription = sbdo.Description;
            csbdo.GradeLevel         = sbdo.GradeLevel;
            csbdo.LearningAreaCode   = sbdo.LearningAreaCode;
        }