public string Reversestr(string str, string naration, bool cheque) { string output = ""; int suc = 0; if (str.Equals("")) { output = "Please Select Payment(s) to Reverse"; } else { string createdby = HttpContext.Current.Session["Username"].ToString(); int recordid = 0; string[] arr = str.Split(','); int i = 0; for (i = 0; i < arr.Length; i++) { recordid = int.Parse(arr[i].ToString()); output = bll.ReversePayment(recordid, naration); if (output.Equals("POSTED")) { suc++; if (cheque) { // Bounce Cheque Payment. datapay.BounceChequePay(recordid, createdby); } } } output = suc + " TRANSACTION(S) POSTED SUCCESSFULLY"; } return(output); }