var incharge = _service.GetEmployeeStatusBySector_Id(sectorId).Where(x => x.DutyType_Id == 7 && x.EmployeeStatusType_Id == 1 && x.IsDutiable == true); foreach (EmployeeStatus Inchargesector in incharge) { var emp = _service.GetEmployee(Inchargesector.Employee_Id); foreach (var empp in incharge) { dataset.InchargeSector.Rows.Add(Inchargesector.EmployeeShift_Id, emp.Name, emp.RankName, emp.CellNo); InchargeSector.Remove(empp); } }
var incharge = _service.GetEmployeeStatusBySector_Id(sectorId).Where(x => x.DutyType_Id == 7 && x.EmployeeStatusType_Id == 1 && x.IsDutiable == true).last();