Esempio n. 1
0
        public ActionResult Register()
        {
            RegisterViewModel rVM = new RegisterViewModel();
            GetCountriesList  getCountriesList = new GetCountriesList();

            rVM.CountriesList = getCountriesList.CountriesList();

            return(View(rVM));
        }
        public ActionResult Create()
        {
            ExpandedUserDTO objExpandedUserDTO = new ExpandedUserDTO();

            GetCountriesList getCountriesList = new GetCountriesList();

            ViewBag.Roles = GetAllRolesAsSelectList();                           // users roles in the list , dropdown

            objExpandedUserDTO.CountriesList = getCountriesList.CountriesList(); // countries in list dropdown

            return(View(objExpandedUserDTO));
        }
        public ActionResult Create()
        {
            CandidateDTO      candidateDTO = new CandidateDTO();
            CampaignViewModel camVM        = new CampaignViewModel();
            // get all the campaigns in the list with thier ids
            var camp = candidateDTO.Campaigns;

            camp = camVM.GetAllCampaignNamesAndID();
            // get countries list to View from account
            GetCountriesList getCountriesList = new GetCountriesList();

            candidateDTO.Countries = getCountriesList.CountriesList(); // set the countries list to, where list is string and it's in the model
            List <string> campainglist = new List <string>();          // get the campaigns name from the list campaings model and add them to string list

            foreach (var item in camp)
            {
                campainglist.Add(item.Description);
            }
            candidateDTO.CampaignsList = campainglist; // string list of campaigns names, store them in the Campaigns list where declared in the model

            return(View(candidateDTO));
        }