public JsonResult SelectQualification()
        {
            StudentRepository    _objNationality = new StudentRepository();
            DataSet              ds            = _objNationality.select_form_load_student();
            List <ProgramLevels> _ProgramLevel = new List <ProgramLevels>();

            if (ds != null)
            {
                if (ds.Tables[3].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[3].Rows)
                    {
                        ProgramLevels _obj = new ProgramLevels();
                        _obj.ProgramLevel_Id = (row["ProgramLevel_Id"].ToString());
                        _obj.ProgramLevel    = row["ProgramLevel"].ToString();
                        _ProgramLevel.Add(_obj);
                    }
                }
            }
            return(Json(new
            {
                List = _ProgramLevel
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
예제 #2
0
        public void selectDropdown()
        {
            StudentRepository     _objNationality = new StudentRepository();
            DataSet               ds             = _objNationality.select_form_load_student();
            List <ProgramLevels>  _ProgramLevels = new List <ProgramLevels>();
            List <Country>        _Country       = new List <Country>();
            List <mCourseOfStudy> _Course        = new List <mCourseOfStudy>();

            if (ds != null)
            {
                if (ds.Tables[4].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[4].Rows)
                    {
                        Country _objcountry = new Country();
                        _objcountry.Country_id   = (row["Country_id"].ToString());
                        _objcountry.Country_Name = row["Country_Name"].ToString();
                        _objcountry.country_code = row["country_code"].ToString();
                        _Country.Add(_objcountry);
                    }
                }
                if (ds.Tables[5].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[5].Rows)
                    {
                        ProgramLevels _objpro = new ProgramLevels();
                        _objpro.ProgramLevel_Id = (row["ProgramLevel_Id"].ToString());
                        _objpro.ProgramLevel    = row["ProgramLevel"].ToString();
                        _ProgramLevels.Add(_objpro);
                    }
                }
                if (ds.Tables[6].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[6].Rows)
                    {
                        mCourseOfStudy _objpro = new mCourseOfStudy();
                        _objpro.CourseOfStudy_ID = (row["CourseOfStudy_ID"].ToString());
                        _objpro.CourseOfStudy    = row["CourseOfStudy"].ToString();
                        _Course.Add(_objpro);
                    }
                    _Course.Add(new mCourseOfStudy {
                        CourseOfStudy_ID = "0", CourseOfStudy = "Other"
                    });
                }
            }
            ViewBag.ProgramLevels = _ProgramLevels;
            ViewBag.Country       = _Country;
            ViewBag.Course        = _Course;
        }
예제 #3
0
        public void SelectDropdown()
        {
            Descipline           obj             = new Descipline();
            DisciplineRepository _objNationality = new DisciplineRepository();
            DataSet           ds          = _objNationality.Select_decipline("1");
            List <Descipline> _Descipline = new List <Descipline>();

            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        Descipline _objDescipline = new Descipline();
                        _objDescipline.Discipline_ID = (row["Discipline_ID"].ToString());
                        _objDescipline.Discipline    = row["Discipline"].ToString();
                        _Descipline.Add(_objDescipline);
                    }
                }
            }

            ProgramLevels           objpro  = new ProgramLevels();
            ProgramLevelsRepository _objpro = new ProgramLevelsRepository();
            DataSet ds1 = _objpro.Select_ProgramLevel("1");
            List <ProgramLevels> _ProgramLevels = new List <ProgramLevels>();

            if (ds1 != null)
            {
                if (ds1.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow row in ds1.Tables[0].Rows)
                    {
                        ProgramLevels _objProgramLevels = new ProgramLevels();
                        _objProgramLevels.ProgramLevel_Id = (row["ProgramLevel_Id"].ToString());
                        _objProgramLevels.ProgramLevel    = row["ProgramLevel"].ToString();
                        _ProgramLevels.Add(_objProgramLevels);
                    }
                }
            }

            CurrencyRepository _objRepo      = new CurrencyRepository();
            DataSet            dsContry      = _objRepo.select_Currency();
            List <Currency>    _ListCurrency = new List <Currency>();

            if (dsContry != null)
            {
                if (dsContry.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow row in dsContry.Tables[0].Rows)
                    {
                        Currency _objcont = new Currency();
                        _objcont.Currency_Id  = row["Currency_Id"].ToString();
                        _objcont.CurrencyCode = row["CurrencyCode"].ToString();
                        _objcont.CurrencyName = row["CurrencyName"].ToString();
                        _ListCurrency.Add(_objcont);
                    }
                }
            }

            ViewBag.Currency      = _ListCurrency;
            ViewBag.Descipline    = _Descipline;
            ViewBag.ProgramLevels = _ProgramLevels;
        }