Beispiel #1
0
        void LoadEditDropdowns(DomainModel.BusinessLayer.Student std)
        {
            List <string> lstcountry = new List <string>();
            List <string> lststate   = new List <string>();

            DomainModel.BusinessLayer.ListCollection LC = new DomainModel.BusinessLayer.ListCollection();
            lstcountry               = LC.LoadCountry();
            lststate                 = LC.LoadState();
            ViewBag.PresentCountry   = new SelectList(lstcountry, std.present_country);
            ViewBag.PresentStates    = new SelectList(lststate, std.present_state);
            ViewBag.PermanentCountry = new SelectList(lstcountry, std.permanent_country);
            ViewBag.PermanentStates  = new SelectList(lststate, std.permanent_state);
            var lstGender = LC.LoadGender();

            ViewBag.GenderCd = new SelectList(lstGender, "lstValue", "lstText", std.gender);
        }
Beispiel #2
0
        void LoadDropdowns()
        {
            List <string> country = new List <string>();
            List <string> state   = new List <string>();

            DomainModel.BusinessLayer.ListCollection LC = new DomainModel.BusinessLayer.ListCollection();
            country           = LC.LoadCountry();
            state             = LC.LoadState();
            ViewBag.CountryId = new SelectList(country);
            ViewBag.StatesId  = new SelectList(state);
            //List<SelectListItem> lstGender = new List<SelectListItem>()
            //{
            //    new SelectListItem(){Value="M",Text="Male"},
            //    new SelectListItem(){Value="F",Text="Female"}
            //};
            //ViewBag.Gender = new SelectList(lstGender, "Value", "Text");
            var lstGender = LC.LoadGender();

            ViewBag.Gender = new SelectList(lstGender, "lstValue", "lstText");
        }