public ActionResult Index() { IndexViewMoal ivm = new IndexViewMoal(); ivm.IEmpList = empService.GetList(); return(View(ivm)); }
public ActionResult Search(IndexViewMoal ivm) { if (ivm.IName != null) { ivm.IEmpList = empService.SearchEmployee(e => e.EmpName == ivm.IName || e.Salary > ivm.ISalary); return(View("Index", ivm)); } else { ivm.IEmpList = empService.GetList(); return(View("Index", ivm)); } }