示例#1
0
        private void btnProcess_Click(object sender, EventArgs e)
        {
            try
            {
                int requestID;
                if (frmErrorMessages.RowCount > 0)
                {
                    WeiMonitoringClient client = new WeiMonitoringClient();
                    if (client != null)
                    {
                        for (int iRow = 0; iRow < frmErrorMessages.Rows.Count; iRow++)
                        {
                            requestID = Convert.ToInt32(frmErrorMessages.Rows[iRow].Cells[0].Value.ToString());
                            client.reprocess(requestID);
                        }
                        //Refresh the grid after the messages were reprocessed. Only the messages that failed the reprocessing
                        // will be populated.

                        PopulateGridWithErrorMessages();
                    }
                }
            }
            catch (FaultException ex)
            {
                throw (ex);
            }
        }
        protected void btnProcessError_Click(object sender, EventArgs e)
        {
            string requestID;

            try
            {
                if (grdShowMessages.Rows.Count > 0)
                {
                    WeiMonitoringClient client = new WeiMonitoringClient();
                    if (client != null)
                    {
                        for (int iRow = 0; iRow < grdShowMessages.Rows.Count; iRow++)
                        {
                            GridViewRow row       = grdShowMessages.Rows[iRow];
                            bool        isChecked = ((CheckBox)row.FindControl("chkSelectRecord")).Checked;
                            if (isChecked)
                            {
                                requestID = row.Cells[1].Text;
                                if (_dbUtils.AddAuditForErrorProcess(Int32.Parse(requestID), "Test"))
                                {
                                    client.reprocess(Int32.Parse(requestID));
                                }
                                ViewState["ProcessError"] = "false";
                            }
                        }
                    }
                }

                populateGridView();
            }
            catch (Exception ex)
            {
                throw(ex);
            }
        }