Пример #1
0
        public EmployeeResponce GetEmployeeByFirstName(string firstName)
        {
            var responce = new EmployeeResponce();

            responce.JsonResult = JsonConvert.SerializeObject(employeeDAC.GetEmployeeByFirstName(firstName));
            return(responce);
        }
Пример #2
0
        public EmployeeResponce GetAllEmployee()
        {
            var responce = new EmployeeResponce();

            responce.JsonResult = JsonConvert.SerializeObject(employeeDAC.GetAllEmployee());
            return(responce);
        }
Пример #3
0
        public void AddEmployee(AddEmployeeRequest request)
        {
            Employee employee = new Employee();

            employee.lastname        = request.Lastname;
            employee.firstname       = request.Firstname;
            employee.title           = request.Title;
            employee.titleofcourtesy = request.Titleofcourtesy;
            employee.birthdate       = request.Birthdate;
            employee.hiredate        = request.Hiredate;
            employee.address         = request.Address;
            employee.city            = request.City;
            employee.region          = request.Region;
            employee.postalcode      = request.Postalcode;
            employee.country         = request.Country;
            employee.phone           = request.Phone;
            employee.mgrid           = request.Mgrid;
            var responce = new EmployeeResponce();

            employeeDAC.AddEmployee(employee);
        }