public string Binstr(string str, string trans_type)
    {
        string output = "";

        if (str.Equals(""))
        {
            output = "Please Select Transaction to archived";
        }
        else
        {
            bool     trans_status = Gettrans_status(trans_type);
            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());
                datapay.BinTransaction(recordid, trans_status, createdby);
            }
            /// Update Batch Details
            output = i + " Transaction(s) have been archived";
        }
        return(output);
    }