Ejemplo n.º 1
0
        public ActionResult Create(string returnUrl)
        {
            ViewBag.returnUrl = returnUrl;
            var result = statusRepo.GetEmployementStatus().Select(x => new { name = x.employemnt_status, id = x.empstId });

            ViewBag.EmpStatus     = new SelectList(statusRepo.GetEmployementStatus().Select(x => new { name = x.employemnt_status, id = x.empstId }), "id", "name", "id");
            ViewBag.roles         = new SelectList(GetRoles().OrderBy(x => x.Name).Where(u => !u.Name.Contains("System Admin") && !u.Name.Contains("Management")).Select(x => new { name = x.Name, id = x.Id }), "Id", "name", "Id");
            ViewBag.prefix        = new SelectList(Apimanager.PrefixeList(), "prefixId", "prefixName", "prefixId");
            ViewBag.businessUnits = new SelectList(BunitsRepo.GetBusinessUnit().OrderBy(x => x.BusId), "BusId", "unitname", "BusId");
            ViewBag.jobTitles     = new SelectList(Apimanager.JobList().OrderBy(x => x.JobName), "JobId", "JobName", "JobId");
            return(View());
        }
 // GET: Requsition/Create
 public ActionResult Create()
 {
     ViewBag.EmpStatus     = new SelectList(statusRepo.GetEmployementStatus().Select(x => new { name = x.employemnt_status, id = x.empstId }), "id", "name", "id");
     ViewBag.businessUnits = new SelectList(BunitsRepo.GetBusinessUnit().Select(x => new { name = x.unitname, id = x.BusId }).OrderBy(x => x.id), "id", "name", "id");
     ViewBag.jobTitles     = new SelectList(JobRepo.GetJobTitles().Select(x => new { name = x.jobtitlename, id = x.JobId }).OrderBy(x => x.name), "id", "name", "id");
     ViewBag.ReportManager = new SelectList(managerRepo.GetReportManager().Select(x => new { name = x.FullName, id = x.managerId }).OrderBy(x => x.name), "id", "name", "id");
     ViewBag.Employee      = new SelectList(EmployeeRepo.getEmployees().Select(x => new { name = x.FullName, id = x.empID }).OrderBy(x => x.id), "id", "name", "id");
     return(View());
 }