private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            _pfServiceClient = new PFServiceClient();

            if (this.pfDataGridView.Columns[e.ColumnIndex] is DataGridViewLinkColumn)
            {
                if (pfDataGridView.Columns[e.ColumnIndex].HeaderText == "EmployeeContrib")
                {
                    var result = _pfServiceClient.GetPfEmployeeControlSofarWithId((int)pfDataGridView["Id", e.RowIndex].Value);
                    MessageBox.Show("Employee Contribution is: " + result);
                }
                else if (pfDataGridView.Columns[e.ColumnIndex].HeaderText == "EmployerContrib")
                {
                    var result = _pfServiceClient.GetPfEmployerControlSofarWithId((int)pfDataGridView["Id", e.RowIndex].Value);

                    MessageBox.Show("Employer Contribution is: " + result);
                }
            }
        }
Beispiel #2
0
        private void pfDataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            _pfServiceClient = new PFServiceClient();

            if (this.pfDataGridView.Columns[e.ColumnIndex] is DataGridViewLinkColumn)
            {
                if (pfDataGridView.Columns[e.ColumnIndex].HeaderText == "EmployeeContrib")
                {
                    var result = _pfServiceClient.GetPfEmployeeControlSofarWithId((int)pfDataGridView[0, e.RowIndex].Value);
                    MessageBox.Show("Employee Contribution is: " + result, "WebService Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else if (pfDataGridView.Columns[e.ColumnIndex].HeaderText == "EmployerContrib")
                {
                    var result = _pfServiceClient.GetPfEmployerControlSofarWithId((int)pfDataGridView[0, e.RowIndex].Value);

                    MessageBox.Show("Employer Contribution is: " + result, "WebService Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }