예제 #1
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;
        }