Ejemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            //EmployeeManager proxy = new EmployeeManager();
            EmployeeManagerSoapClient proxy = new EmployeeManagerSoapClient();
            int id = (int)comboBox1.SelectedItem;

            label6.Text = proxy.Delete(id);
        }
Ejemplo n.º 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            //EmployeeManager proxy = new EmployeeManager();
            EmployeeManagerSoapClient proxy = new EmployeeManagerSoapClient();

            Employee[] data = proxy.SelectAll();
            foreach (Employee emp in data)
            {
                comboBox1.Items.Add(emp.EmployeeID);
            }
        }
Ejemplo n.º 3
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            //EmployeeManager proxy = new EmployeeManager();
            EmployeeManagerSoapClient proxy = new EmployeeManagerSoapClient();
            Employee data = proxy.SelectByID((int)comboBox1.SelectedItem);

            textBox1.Text = data.FirstName;
            textBox2.Text = data.LastName;
            textBox3.Text = data.HomePhone;
            textBox4.Text = data.Notes;
            label6.Text   = "";
        }
Ejemplo n.º 4
0
        private void button2_Click(object sender, EventArgs e)
        {
            //EmployeeManager proxy = new EmployeeManager();
            EmployeeManagerSoapClient proxy = new EmployeeManagerSoapClient();
            Employee data = new Employee();

            //data.EmployeeID = int.Parse(textBox5.Text);
            data.FirstName = textBox1.Text;
            data.LastName  = textBox2.Text;
            data.HomePhone = textBox3.Text;
            data.Notes     = textBox4.Text;
            label6.Text    = proxy.Insert(data);
        }
Ejemplo n.º 5
0
        private void button1_Click(object sender, EventArgs e)
        {
            //EmployeeManager proxy = new EmployeeManager();
            EmployeeManagerSoapClient proxy = new EmployeeManagerSoapClient();
            Employee data = new Employee();

            data.EmployeeID = (int)comboBox1.SelectedItem;
            data.FirstName  = textBox1.Text;
            data.LastName   = textBox2.Text;
            data.HomePhone  = textBox3.Text;
            data.Notes      = textBox4.Text;
            label6.Text     = proxy.Update(data);
        }