public EmployeeRegistrationResponse registerEmployee(Employee employeeRegd) { Console.WriteLine("In registerEmployee"); EmployeeRegistrationResponse employeeReply = new EmployeeRegistrationResponse(); EmployeeRegistration.getInstance().Add(employeeRegd); employeeReply.EmpName = employeeRegd.EmpName; employeeReply.EmpID = employeeRegd.EmpID; employeeReply.Department = employeeRegd.Department; return(employeeReply); }
public EmployeeRegistrationReply registerEmployee(Employee empregd) { Console.WriteLine("In registerEmployee"); EmployeeRegistrationReply empregreply = new EmployeeRegistrationReply(); EmployeeRegistration.getInstance().Add(empregd); empregreply.Name = empregd.Name; empregreply.Age = empregd.Age; empregreply.ID = empregd.EmployeeID; empregreply.registrationStatus = "Successful"; return(empregreply); }
public Employee PostEmployee([FromBody] Employee value) { Employee emp = new Employee(); Console.WriteLine("In employeeRegistration"); Employee empObj = new Employee(); EmployeeRegistration.getInstance().Add(value); empObj.ID = value.ID; empObj.Name = value.Name; empObj.Age = value.Age; return(empObj); }
public EmployeeRegistrationReply addEmployee(Employees empregd) { Console.WriteLine("In registerStudent"); EmployeeRegistrationReply empregreply = new EmployeeRegistrationReply(); EmployeeRegistration.getInstance().Add(empregd); empregreply.firstName = empregd.firstName; empregreply.lastName = empregd.lastName; empregreply.Email = empregd.Email; empregreply.HireDate = empregd.HireDate; empregreply.EmployeeID = empregd.EmployeeID; empregreply.DepartmentName = empregd.DepartmentName; empregreply.Salary = empregd.Salary; empregreply.RegistrationStatus = "Successful"; return(empregreply); }
public List <Employees> GetAllEmployee() { //if (EmployeeRegistration.getInstance().getAllEmployees() == null) //{ // return new List<Employees> //{ // new Employees // { // firstName = "Glenn", // lastName = "Block", // Email = "", // HireDate = "03/04/2018", // Salary = 8900, // DepartmentName = "QA", // EmployeeID = 777 // }, // new Employees // { // firstName = "Dan", // lastName = "Roth", // Email = "", // HireDate = "03/02/2018", // Salary = 89000, // DepartmentName = "QA II", // EmployeeID = 333 // } //}; //} //else //{ Console.WriteLine("Get method is called"); return(EmployeeRegistration.getInstance().getAllEmployees()); //} }
public String DeleteEmployeeRecord(int ID) { Console.WriteLine("In deleteStudentRecord"); return(EmployeeRegistration.getInstance().Remove(ID)); }
public string UpdateEmployee([FromBody] Employee value) { Console.WriteLine("In updateStudentRecord"); return(EmployeeRegistration.getInstance().UpdateEmployee(value)); }
public Employee GetByEmployeesID(int empID) { Employee employees_data = EmployeeRegistration.getInstance().GetbyID(empID); return(employees_data); }
//Employee[] employees = new Employee[] //{ // new Employee { ID = 1, Name = "Mark", Age = 30 }, // new Employee { ID = 2, Name = "Allan", Age = 35 }, // new Employee { ID = 3, Name = "Johny", Age = 21 } //}; public List <Employee> GetAllEmployees() { var employees = EmployeeRegistration.getInstance().getAllEmployee(); return(employees); }
public String DeleteEmployee(int empID) { Console.WriteLine("In delete Employee record"); return(EmployeeRegistration.getInstance().Remove(empID)); }
public String PutEmployeeRecord(Employee emp) { Console.WriteLine("In updateEmployeeRecord"); return(EmployeeRegistration.getInstance().UpdateEmployee(emp)); }
public List <Employee> GetAllEmployee() { return(EmployeeRegistration.getInstance().getAllEmployee()); }