Пример #1
0
 protected void btnGetEmployee_Click(object sender, EventArgs e)
 {
     EmployeeService.EmployeeServiceClient client = new EmployeeService.EmployeeServiceClient();
     EmployeeService.Employee employee            = client.GetEmployee(Convert.ToInt32(txtId.Text));
     txtId.Text     = employee.Id.ToString();
     txtName.Text   = employee.Name;
     txtGender.Text = employee.Gender;
     txtDOB.Text    = employee.DateOfBirth.ToString();
 }
Пример #2
0
 protected void btnSaveEmployee_Click(object sender, EventArgs e)
 {
     EmployeeService.EmployeeServiceClient client = new EmployeeService.EmployeeServiceClient();
     EmployeeService.Employee employee            = new EmployeeService.Employee();
     employee.Id          = Convert.ToInt32(txtId.Text);
     employee.Gender      = txtGender.Text;
     employee.Name        = txtName.Text;
     employee.DateOfBirth = Convert.ToDateTime(txtDOB.Text);
     client.SaveEmployee(employee);
 }