protected void OkButton_Click(object sender, EventArgs e) { DateTime transactionDate = DateTime.Now; long transactionMasterId = Conversion.TryCastLong(this.Request["TranId"]); VerificationModel model = Verification.GetVerificationStatus(transactionMasterId); if ( model.Verification.Equals(0) //Awaiting verification || model.Verification.Equals(2) //Automatically Approved by Workflow ) { //Withdraw this transaction. if (transactionMasterId > 0) { if (Verification.WithdrawTransaction(transactionMasterId, SessionHelper.GetUserId(), this.ReasonTextBox.Text)) { this.MessageLabel.Text = string.Format("The transaction was withdrawn successfully. Moreover, this action will affect the all the reports produced on and after \"{0}\".", transactionDate.ToShortDateString()); this.MessageLabel.CssClass = "success vpad12"; } } } else { this.MessageLabel.Text = "Cannot withdraw transaction."; this.MessageLabel.CssClass = "error vpad12"; } this.ShowVerificationStatus(); }