protected void btnReprocess_Click(object sender, EventArgs e) { //System.Threading.Thread.Sleep(5000); bool blResult = false; uploadsCommonBo = new UploadCommonBo(); UploadProcessLogVo processlogVo = new UploadProcessLogVo(); string error = ""; int processIdReprocessAll = 0; int countTransactionsInserted = 0; int countRejectedRecords = 0; if (Request.QueryString["processId"] != null) { ProcessId = Int32.Parse(Request.QueryString["processId"].ToString()); processlogVo = uploadsCommonBo.GetProcessLogInfo(ProcessId); if (processlogVo.FileTypeId == 1 || processlogVo.FileTypeId == 3 || processlogVo.FileTypeId == 15 || processlogVo.FileTypeId == 17) { blResult = MFWERPTransactionWERPInsertion(ProcessId, out countTransactionsInserted, out countRejectedRecords, processlogVo.FileTypeId); } } else { DataSet ds = uploadsCommonBo.GetUploadDistinctProcessIdForAdviser(adviserVo.advisorId); foreach (DataRow dr in ds.Tables[0].Rows) { processIdReprocessAll = int.Parse(dr["ProcessId"].ToString()); processlogVo = uploadsCommonBo.GetProcessLogInfo(processIdReprocessAll); if (processlogVo.FileTypeId == 1 || processlogVo.FileTypeId == 3 || processlogVo.FileTypeId == 15 || processlogVo.FileTypeId == 17) { blResult = MFWERPTransactionWERPInsertion(processIdReprocessAll, out countTransactionsInserted, out countRejectedRecords, processlogVo.FileTypeId); } if (blResult == false) { error = error + "Error when reprocessing for the processid:" + processIdReprocessAll + ";"; } } } if (error == "") { // Success Message //trErrorMessage.Visible = true; //lblError.Text = "Reprocess Done Successfully!"; msgReprocessComplete.Visible = true; } else { // Failure Message trErrorMessage.Visible = true; msgReprocessincomplete.Visible = true; lblError.Text = "ErrorStatus:" + error; } BindEquityTransactionGrid(ProcessId); //used to display alert msg after completion of reprocessing }