public void LoadDropDowns(int branchid, int clusterid, int groupid)
        {
            SelectList leadershiptitle = GetDropDownListByMasterCode(Enums.RefMasterCodes.LEADERSHIP_TITLE);

            ViewBag.leadershiptitle = leadershiptitle;



            List <SelectListDto> lstselectBranch = _branchService.GetBranchSelectList();
            SelectList           lstbranchs      = new SelectList(lstselectBranch, "ID", "Text");

            ViewBag.BranchNames = lstbranchs;


            List <SelectListDto> clusterSelectList = _clusterService.GetClusterSelectListByBranchID(branchid);
            SelectList           lStClusters       = new SelectList(clusterSelectList, "ID", "Text");

            ViewBag.ClusterNames = lStClusters;


            List <SelectListDto> groupSelectList = _groupService.GetGroupByClusterID(clusterid);
            SelectList           lstGroupNames   = new SelectList(groupSelectList, "ID", "Text");

            ViewBag.GroupNames = lstGroupNames;

            List <SelectListDto> memberSelectList = _memberService.GetMemberByGroupId(groupid);
            SelectList           lstMemberNames   = new SelectList(memberSelectList, "ID", "Text");

            ViewBag.MemberNames = lstMemberNames;

            List <SelectListDto> lstselectLeadershipLevel = _leadershipService.GetLeadershiplevelSelectList();
            SelectList           lstLevels = new SelectList(lstselectLeadershipLevel, "ID", "Text");

            ViewBag.LeadershipLevels = lstLevels;
        }
Exemple #2
0
        private void LoadDropDowns()
        {
            var stateSelectListDto = _stateService.GetStateSelectList();
            var stateSelectList    = new SelectList(stateSelectListDto, "ID", "Text", 0);

            ViewBag.States = stateSelectList;

            var districtSelectListDto = _districtService.GetDistrictSelectList();
            var districtSelectList    = new SelectList(districtSelectListDto, "ID", "Text", 0);

            ViewBag.Districts = districtSelectList;

            var mandalSelectListDto = _mandalService.GetMandalSelectList();
            var mandalSelectList    = new SelectList(mandalSelectListDto, "ID", "Text", 0);

            ViewBag.Mandals = mandalSelectList;

            var branchSelectListDto = _branchService.GetBranchSelectList();
            var branchSelectList    = new SelectList(branchSelectListDto, "ID", "Text");

            ViewBag.Branches = branchSelectList;

            var employeeSelectListDto = _employeeService.GetEmployeeSelectList();
            var employeeSelectList    = new SelectList(employeeSelectListDto, "ID", "Text");

            ViewBag.Leaders = employeeSelectList;
        }