当前位置: 首页>>代码示例>>C#>>正文


C# ClsBAL.GetTcktDetByMRefNo方法代码示例

本文整理汇总了C#中BAL.ClsBAL.GetTcktDetByMRefNo方法的典型用法代码示例。如果您正苦于以下问题:C# ClsBAL.GetTcktDetByMRefNo方法的具体用法?C# ClsBAL.GetTcktDetByMRefNo怎么用?C# ClsBAL.GetTcktDetByMRefNo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BAL.ClsBAL的用法示例。


在下文中一共展示了ClsBAL.GetTcktDetByMRefNo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BookTicket

    protected void BookTicket()
    {
        try
        {
            int sourceStationId = 0; int destinationStationId = 0; string journeyDate = "";
            long serviceId = 0; int serviceTransId = 0; int noOfSeats = 0; string address = ""; string contactNo = ""; string emailID = "";
            long blockedTicketId = 0; string apiname = ""; string boradingpointid = ""; int k = 0;
            string status = ""; string api = "";
            DataSet dsbookresult = null;
            if (Session["manabusrefno"] != null)
            {
                ObjBAL = new ClsBAL();
                ObjBAL.manabusRefNo = Session["manabusrefno"].ToString();
                _objDataSetBook = (DataSet)ObjBAL.GetTcktDetByMRefNo();
                if (_objDataSetBook != null)
                {
                    if (_objDataSetBook.Tables.Count > 0)
                    {
                        if (_objDataSetBook.Tables[0].Rows.Count > 0)
                        {
                            if (_objDataSetBook.Tables[0].Rows.Count < 3)
                            {
                                #region Book Ticket
                                foreach (DataRow dr in _objDataSetBook.Tables[0].Rows)
                                {
                                    string manabusrefNo = dr["OnewayMBRefNo"].ToString();
                                    apiname = dr["APIName"].ToString();
                                    sourceStationId = Convert.ToInt32(dr["SourceId"].ToString());
                                    destinationStationId = Convert.ToInt32(dr["DestinationId"].ToString());
                                    DateTime doj = Convert.ToDateTime(dr["DateOfJourney"]);
                                    boradingpointid = dr["BoardingPointID"].ToString();

                                    if (apiname == "Abhibus" || apiname == "Kallada")
                                    {
                                        journeyDate = doj.ToString("yyyy-MM-dd");
                                    }
                                    else
                                    {
                                        journeyDate = doj.ToString("yyyy/MM/dd");
                                    }

                                    if (dr["ServiceID"].ToString() == "")
                                    {
                                        serviceId = 0;
                                    }
                                    else
                                    {
                                        serviceId = Convert.ToInt64(dr["ServiceID"].ToString());
                                    }
                                    string bookinId = "";

                                    address = dr["Address"].ToString();
                                    contactNo = dr["ContactNo"].ToString();
                                    emailID = dr["EmailId"].ToString();
                                    if (dr["ServiceTranDateID"].ToString() == "")
                                    {
                                        serviceTransId = 0;
                                    }
                                    else
                                    {
                                        serviceTransId = Convert.ToInt32(dr["ServiceTranDateID"].ToString());
                                    }
                                    noOfSeats = Convert.ToInt32(dr["NoOfSeats"].ToString());
                                    if (apiname != "TicketGoose")
                                    {
                                        if (dr["BlockedId"].ToString() == "")
                                        {
                                            blockedTicketId = 0;
                                        }
                                        else
                                        {
                                            blockedTicketId = Convert.ToInt64(dr["BlockedId"].ToString());
                                        }
                                    }
                                    else { blockedTicketId = 0; bookinId = Convert.ToString(dr["BlockedId"].ToString()); }
                                    string seatNos = dr["SeatNos"].ToString();
                                    string gendertype = dr["Gender"].ToString();
                                    string psgrname = dr["FullName"].ToString();
                                    string idType = dr["IDType"].ToString();
                                    string idNo = dr["IDNumber"].ToString();
                                    string idIssuedBy = dr["IDIssuedBy"].ToString();
                                    string[] selectedSeatsArray = seatNos.Split(',');
                                    book_ticket bookTicket = new book_ticket();
                                    object[] obj = new object[2];

                                    book_ticketSeat_detailsSeat_detail[] sD = new book_ticketSeat_detailsSeat_detail[noOfSeats];

                                    string strPassengers = dr["PassengerDetails"].ToString();
                                    string[] strPassengersArray = strPassengers.Split(',');

                                    for (int i = 0; i < noOfSeats; i++)
                                    {
                                        book_ticketSeat_detailsSeat_detail sdd = new book_ticketSeat_detailsSeat_detail();
                                        sdd.seat_number = selectedSeatsArray[i].ToString();

                                        string strPassenger = strPassengersArray[i].ToString();
                                        string[] strPassengerArray = strPassenger.Split('-');

                                        sdd.title = strPassengerArray[1].ToString();

//.........这里部分代码省略.........
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:101,代码来源:BookByCashCoupon.aspx.cs


注:本文中的BAL.ClsBAL.GetTcktDetByMRefNo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。