protected void GetIntBookingStatus(string refNo)
    {
        try
        {
            DataSet ds = new DataSet();
            FlightBAL objFlightBal = new FlightBAL();
            string result = string.Empty;
            string EticketDetailsId = string.Empty;
            string givenName = string.Empty;
            string surName = string.Empty;
            string nameReference = string.Empty;
            string psgrType = string.Empty;
            string originDestinationOptionId = string.Empty;
            string onwardId = string.Empty;
            string FlightSegmentsId = string.Empty;
            string FlightSegmentId = string.Empty;
            string eticketdto_Id = string.Empty;
            string AirlinePNR = string.Empty; // ConfirmationId
            string GDFPNRNumber = string.Empty; //PNRNumber
            string eticketNo = string.Empty;
            string flightUid = string.Empty;
            string passuid = string.Empty;

            DataSet dsGetTransId = new DataSet();
            dsGetTransId = objFlightBal.GetIntTransID(refNo);
            transId = dsGetTransId.Tables[0].Rows[0]["transid"].ToString();

            String xmlRequest = "<EticketRequest><Clientid>" + FlightsConstants.USERID + "</Clientid><Clientpassword>" + FlightsConstants.PASSWORD + "</Clientpassword><Clienttype>ArzooINTLWS1.0</Clienttype><transid>" + transId + "</transid></EticketRequest>";
            ds = objFlightBal.GetDatasetFromAPI(xmlRequest, "http://live.arzoo.com:9302/BookingStatus");

            if (ds.Tables["EticketDetails"].Columns.Contains("EticketDetails_Id"))
            {
                EticketDetailsId = ds.Tables["EticketDetails"].Rows[0]["EticketDetails_Id"].ToString();

                DataTable dtOriginDestinationOption = (DataTable)ds.Tables["OriginDestinationOption"];
                if (dtOriginDestinationOption.Rows.Count > 0)
                {
                    DataRow[] rowOriginDestinationOption = dtOriginDestinationOption.Select("eticketDetails_Id=" + EticketDetailsId);
                    originDestinationOptionId = rowOriginDestinationOption[0]["originDestinationOption_Id"].ToString();
                }
                DataTable dtOnward = (DataTable)ds.Tables["onward"];
                if (dtOnward.Rows.Count > 0)
                {
                    DataRow[] rowOnward = dtOnward.Select("originDestinationOption_Id=" + originDestinationOptionId);
                    onwardId = rowOnward[0]["Onward_Id"].ToString();
                }
                DataTable dtFlightSegments = (DataTable)ds.Tables["FlightSegments"];
                if (dtFlightSegments.Rows.Count > 0)
                {
                    DataRow[] rowFlightSegments = dtFlightSegments.Select("Onward_Id=" + onwardId);
                    FlightSegmentsId = rowFlightSegments[0]["FlightSegments_Id"].ToString();
                }

                DataTable dtFlightSegment = (DataTable)ds.Tables["FlightSegment"];
                if (dtFlightSegment.Rows.Count > 0)
                {
                    for (int i = 0; i < dtFlightSegment.Rows.Count; i++)
                    {
                        DataRow[] rowFlightSegment = dtFlightSegment.Select("FlightSegments_Id=" + FlightSegmentsId);
                        FlightSegmentId = rowFlightSegment[i]["FlightSegment_Id"].ToString();
                        AirlinePNR = (AirlinePNR == "") ? rowFlightSegment[i]["confirmationid"].ToString() : AirlinePNR + "|" + rowFlightSegment[i]["confirmationid"].ToString();
                        GDFPNRNumber = (GDFPNRNumber == "") ? rowFlightSegment[i]["pnrnumber"].ToString() : GDFPNRNumber + "|" + rowFlightSegment[i]["pnrnumber"].ToString();

                        DataTable dtEticketDto = (DataTable)ds.Tables["Eticketdto"];
                        if (dtEticketDto.Rows.Count > 0)
                        {
                            DataRow[] rowEticketdto = dtEticketDto.Select("FlightSegment_Id=" + FlightSegmentId);
                            eticketdto_Id = rowEticketdto[0]["eticketdto_id"].ToString();
                            eticketNo = (eticketNo == "") ? rowEticketdto[i]["eticketno"].ToString() : eticketNo + "|" + rowEticketdto[i]["eticketno"].ToString();
                            flightUid = (flightUid == "") ? rowEticketdto[i]["flightuid"].ToString() : flightUid + "|" + rowEticketdto[i]["flightuid"].ToString();
                            passuid = (passuid == "") ? rowEticketdto[i]["passuid"].ToString() : passuid + "|" + rowEticketdto[i]["passuid"].ToString();

                        }
                    }
                }
                string status = ds.Tables[0].Rows[0]["status"].ToString();

                objFlightBal.Status = status;
                objFlightBal.TransId = transId;
                objFlightBal.ReferenceNo = refNo;
                objFlightBal.AirlinePNR = AirlinePNR;
                objFlightBal.GDFPNRNo = GDFPNRNumber;
                objFlightBal.passuid = passuid;
                objFlightBal.Flightuid = flightUid;
                objFlightBal.eticketNo = eticketNo;

                if (objFlightBal.Status == "SUCCESS")
                {
                    statusCnt++;
                    if (statusCnt < 3)
                    {
                        GetIntBookingStatus(refNo);
                    }
                    else
                    {
                        bool res = objFlightBal.UpdateInternationalFlightBookingStatus(objFlightBal);
                        if (res)
                        {
                            lblStatus.Text = "Your ticket status is " + objFlightBal.Status;
                            lblStatus.ForeColor = System.Drawing.Color.Green;
                        }
                    }
                }

            }
            else
            {
                lblStatus.Text = "Your ticket is under booking process";
            }

        }
        catch (Exception ex)
        {

        }
    }