Exemplo n.º 1
0
 protected void saveEmployee(object sender, EventArgs e)
 {
     EmployeeService.EmployeeServiceClient client = new EmployeeService.EmployeeServiceClient();
     EmployeeService.Employee employee            = new EmployeeService.Employee();
     employee.Id          = Convert.ToInt32(txtId.Text);
     employee.Name        = txtName.Text;
     employee.Gender      = txtGender.Text;
     employee.DateOfBirth = Convert.ToDateTime(txtDateOfBirth.Text);
     client.SaveEmployee(employee);
 }
Exemplo n.º 2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            EmployeeService.Employee employee = new EmployeeService.Employee();
            employee.Id   = Convert.ToInt32(txtID.Text);
            employee.Name = txtName.Text;
            EmployeeService.EmployeeServiceClient client = new
                                                           EmployeeService.EmployeeServiceClient();
            client.SaveEmployee(employee);

            lblMessage.Text = "Employee saved";
        }
Exemplo n.º 3
0
        protected void getEmployee(object sender, EventArgs e)
        {
            EmployeeService.EmployeeServiceClient client = new
                                                           EmployeeService.EmployeeServiceClient();

            EmployeeService.Employee employee = client.GetEmployee(Convert.ToInt32(txtId.Text));
            txtName.Text        = employee.Name;
            txtGender.Text      = employee.Gender;
            txtDateOfBirth.Text = employee.DateOfBirth.ToShortDateString();
            Label4.Text         = "Employee retrieved";
        }
Exemplo n.º 4
0
        protected void btnGetEmployee_Click(object sender, EventArgs e)
        {
            EmployeeService.EmployeeServiceClient client = new
                                                           EmployeeService.EmployeeServiceClient();

            EmployeeService.Employee employee =
                client.GetEmployee(Convert.ToInt32(txtID.Text));

            txtName.Text = employee.Name;


            lblMessage.Text = "Employee retrieved";
        }