private void frmInterfaceGrid_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (frmInterfaceGrid.RowCount > 0)
            {
                if (e.ColumnIndex == 3)
                {
                    string message = "Unable to get message statistics";
                    object value   = frmInterfaceGrid.Rows[e.RowIndex].Cells[0].Value;

                    WeiMonitoringClient client = new WeiMonitoringClient();
                    message = client.getStatistics(int.Parse(value.ToString()));

                    // Use the 'client' variable to call operations on the service.

                    // Always close the client.
                    client.Close();
                    MessageBox.Show(message);
                    //StatusLabel.Text = message;
                }
            }
        }
Example #2
0
        private void frmInterfaceGrid_CellContentClick_1(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (frmInterfaceGrid.RowCount > 0)
                {
                    if (e.ColumnIndex == 3)
                    {
                        string message = "Unable to get message statistics";
                        object value   = frmInterfaceGrid.Rows[e.RowIndex].Cells[0].Value;

                        WeiMonitoringClient client = new WeiMonitoringClient();
                        if (client != null)
                        {
                            message = client.getStatistics(int.Parse(value.ToString()));
                            // Use the 'client' variable to call operations on the service.

                            // Always close the client.
                            client.Close();
                            MessageBox.Show(message);
                        }
                    }
                    if (e.ColumnIndex == 4)
                    {
                        //Application.Run(new ShowRequestsWithErrors());
                        //ShowRequestsWithErrors.ActiveForm.ShowDialog();
                        int _interfaceID;
                        _interfaceID = Int32.Parse(frmInterfaceGrid.Rows[e.RowIndex].Cells[0].Value.ToString());
                        ShowRequestsWithErrors newForm = new ShowRequestsWithErrors(_interfaceID);
                        newForm.ShowDialog();
                    }
                }
            }
            catch (Exception ex)
            {
            }
            finally
            {
            }
        }