public ActionResult _EmployeeLeaveAssign() { List <EmployeeLeaveAssignVM> viewModels = new List <EmployeeLeaveAssignVM>(); List <Entities.EmployeeLeaveTransaction> employeeList = new List <Entities.EmployeeLeaveTransaction>(); EmployeeBAL balObject = new EmployeeBAL(); IQueryable <Entities.EmployeeLeaveTransaction> entites = balObject.GetAllEmployeeLeaveAssign(SessionHelper.SchoolId); foreach (Entities.EmployeeLeaveTransaction entity in entites) { EmployeeLeaveAssignVM viewModel = new EmployeeLeaveAssignVM(); viewModel.EmployeeId = entity.EmployeeId; viewModel.EmployeeFullName = entity.EmployeeFullName; viewModel.BalanceLeaves = entity.BalanceLeaves; viewModel.Remark = entity.Remark; viewModels.Add(viewModel); } return(PartialView("_EmployeeLeaveAssign", viewModels)); }