本文整理汇总了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();
//.........这里部分代码省略.........