예제 #1
0
        private AllStudentsUnits[] GetRegUnits()
        {
            List <AllStudentsUnits_Filter> units_Filters = new List <AllStudentsUnits_Filter>();
            AllStudentsUnits_Filter        units_Filter  = new AllStudentsUnits_Filter();
            AllStudentsUnits_Filter        units_Filter1 = new AllStudentsUnits_Filter();
            AllStudentsUnits_Filter        units_Filter2 = new AllStudentsUnits_Filter();

            //Student No filter
            units_Filter.Field    = AllStudentsUnits_Fields.Student_No;
            units_Filter.Criteria = StudentNo();

            //Stage filter
            units_Filter1.Field    = AllStudentsUnits_Fields.Stage;
            units_Filter1.Criteria = GetStudentInfo().Current_Student_Stage;

            //Semester filter
            units_Filter2.Field    = AllStudentsUnits_Fields.Semester;
            units_Filter2.Criteria = GetStudentInfo().Current_Semester;

            units_Filters.Add(units_Filter);
            units_Filters.Add(units_Filter1);
            units_Filters.Add(units_Filter2);

            AllStudentsUnits[] reg_units = WebServices.AllStudentUnitsService().ReadMultiple(units_Filters.ToArray(), null, 0);

            return(reg_units);
        }
예제 #2
0
        private AllStudentsUnits[] GetAppliedUnits(string actionUrl)
        {
            AllStudentsUnits_Service units_serv = WebServices.AllStudentUnitsService();

            List <AllStudentsUnits_Filter> units_Filters = new List <AllStudentsUnits_Filter>();
            AllStudentsUnits_Filter        units_Filter  = new AllStudentsUnits_Filter();
            AllStudentsUnits_Filter        units_Filter1 = new AllStudentsUnits_Filter();
            AllStudentsUnits_Filter        units_Filter2 = new AllStudentsUnits_Filter();
            AllStudentsUnits_Filter        units_Filter3 = new AllStudentsUnits_Filter();

            //AllStudentsUnits_Filter units_Filter4 = new AllStudentsUnits_Filter();

            //Student No filter
            units_Filter.Field    = AllStudentsUnits_Fields.Student_No;
            units_Filter.Criteria = StudentNo();

            //Stage filter
            units_Filter1.Field    = AllStudentsUnits_Fields.Stage;
            units_Filter1.Criteria = GetStudentInfo().Current_Student_Stage;

            //Semester filter
            units_Filter2.Field    = AllStudentsUnits_Fields.Semester;
            units_Filter2.Criteria = GetStudentInfo().Current_Semester;

            //Register for filter
            if (!String.IsNullOrEmpty(actionUrl) && actionUrl == "Supplementary")
            {
                //apply for supplementary
                units_Filter3.Field    = AllStudentsUnits_Fields.Register_for;
                units_Filter3.Criteria = "Supplementary";
            }
            else if (!String.IsNullOrEmpty(actionUrl) && actionUrl == "Special")
            {
                // apply for  special
                units_Filter3.Field    = AllStudentsUnits_Fields.Register_for;
                units_Filter3.Criteria = "Special";
            }
            else if (!String.IsNullOrEmpty(actionUrl) && actionUrl == "Retake")
            {
                // Retake
                units_Filter3.Field    = AllStudentsUnits_Fields.Register_for;
                units_Filter3.Criteria = "Retake";
            }

            //Failed filter
            //units_Filter4.Field = AllStudentsUnits_Fields.Failed;
            //units_Filter4.Criteria = "Yes";

            units_Filters.Add(units_Filter);
            units_Filters.Add(units_Filter1);
            units_Filters.Add(units_Filter2);
            units_Filters.Add(units_Filter3);
            //units_Filters.Add(units_Filter4);

            AllStudentsUnits[] reg_units = units_serv.ReadMultiple(units_Filters.ToArray(), null, 0);

            return(reg_units);
        }
예제 #3
0
        public ActionResult Attendance()
        {
            SetViewBag();

            List <AllStudentsUnits_Filter> filters = new List <AllStudentsUnits_Filter>();
            AllStudentsUnits_Filter        filter  = new AllStudentsUnits_Filter();

            filter.Field    = AllStudentsUnits_Fields.Student_No;
            filter.Criteria = StudentNo();

            ViewBag.CallBackUrlOnRefresh = callBackUrl("Attendance");

            filters.Add(filter);
            AllStudentsUnits[] units = WebServices.AllStudentUnitsService().ReadMultiple(filters.ToArray(), null, 0);
            return(View(units));
        }
예제 #4
0
        public List <AllStudentsUnits> StudentProgramme()
        {
            var un_serv = WebServices.AllStudentUnitsService();
            List <AllStudentsUnits_Filter> u_filters = new List <AllStudentsUnits_Filter>();
            AllStudentsUnits_Filter        u_filter  = new AllStudentsUnits_Filter();
            AllStudentsUnits_Filter        u_filter1 = new AllStudentsUnits_Filter();
            AllStudentsUnits_Filter        u_filter2 = new AllStudentsUnits_Filter();

            u_filter.Field    = AllStudentsUnits_Fields.Programme;
            u_filter.Criteria = GetStudentInfo().Programme;

            u_filter1.Field    = AllStudentsUnits_Fields.Failed;
            u_filter1.Criteria = "Yes";

            u_filter2.Field    = AllStudentsUnits_Fields.Student_No;
            u_filter2.Criteria = StudentNo();

            u_filters.Add(u_filter);
            u_filters.Add(u_filter1);
            u_filters.Add(u_filter2);

            return(un_serv.ReadMultiple(u_filters.ToArray(), null, 0).ToList());
        }