public Employee getElementById(int id) { Employee oEmp = new Employee() { Id = id }; TrainingCenterEntities oEntity = ConnectionEntities.getTrainingCenter(mAcount); var data = oEntity.SP_GetByID_Employee(oEmp.Id); foreach (var item in data) { oEmp.EmployeeName = item.EmployeeName; oEmp.Email = item.Email; oEmp.Address = item.Address; oEmp.Mobile = item.Mobile; oEmp.Phone = item.Phone; oEmp.IdentityNumber = item.IdentityNumber; oEmp.PersonalTaxCode = item.PersonalTaxCode; oEmp.Description = item.Description; oEmp.PlaceOfIssue = item.PlaceOfIssue; oEmp.PlaceBirthday = item.PlaceBirthday; oEmp.EmployeeCV = item.EmployeeCV; oEmp.UniversityName = item.UniversityName; oEmp.Sex = item.Sex; if (item.Sex == 0) { oEmp.SexString = "Nữ"; } else { oEmp.SexString = "Nam"; } oEmp.DateBirhday = item.DateBirhday; oEmp.DateOfIssue = item.DateOfIssue; oEmp.OuId = item.OuId; oEmp.CenterId = item.CenterId; oEmp.JobTitleId = item.JobTitleId; return(oEmp); } return(null); }