public void Add(EmployeeWithAddress employee) { _manager.Add(new EmployeeService.Model.Employee() { Id = employee.Id, Name = employee.Name, Age = employee.Age, Designation = employee.Designation }); _employeeList.Add(employee.Id, employee.EmployeeAddress); }
public void Write(EmployeeWithAddress employeeWithAddress) { using (XmlWriter writer = XmlWriter.Create("employees.xml")) { writer.WriteStartDocument(); writer.WriteStartElement("Employees"); writer.WriteStartElement("Employee"); writer.WriteElementString("ID", employeeWithAddress.Id.ToString()); writer.WriteElementString("Name", employeeWithAddress.Name); writer.WriteElementString("Age", employeeWithAddress.Age.ToString()); writer.WriteElementString("Designation", employeeWithAddress.Designation.ToString()); writer.WriteStartElement("Address"); writer.WriteElementString("DorrNo", employeeWithAddress.EmployeeAddress.DorrNo.ToString()); writer.WriteElementString("BuildingName", employeeWithAddress.EmployeeAddress.BuildingName.ToString()); writer.WriteElementString("StreetName", employeeWithAddress.EmployeeAddress.Streetname.ToString()); writer.WriteElementString("City", employeeWithAddress.EmployeeAddress.City.ToString()); writer.WriteElementString("Country", employeeWithAddress.EmployeeAddress.Country.ToString()); writer.WriteEndElement(); writer.WriteEndElement(); } }
public void Write(EmployeeWithAddress employeeWithAddress) { _iEmployeeWriter.Write(employeeWithAddress); }
public void Add(EmployeeWithAddress employee) { _employeeAdaptorRepository.Add(employee); }