Beispiel #1
0
        public void Confirm(string tripID, string bookingID)
        {
            try
            {
                DataControlBaseDataAccess.StartTransaction();

                BookingDetailController controller = new BookingDetailController();
                BookingDetailInfo       info       = controller.SelectBookingDetail(tripID, bookingID);

                string   seat  = info.SeatNo;
                string[] array = seat.Split(',');
                seatNo = "";
                for (int i = 0; i < array.Length; i++)
                {
                    seatNo = array[i];
                    TripDetailDataAccess.UpdateStatusByTripID(tripID, seatNo, "S");
                }

                string autoCode = SaleDataAccess.AutogenerateCode("Sale");

                BookingDataAccess.Confirm(bookingID, autoCode);
            }
            catch (Exception ex)
            {
                DataControlBaseDataAccess.RollBackTransaction();
                throw ex;
            }
        }
Beispiel #2
0
        public SaleInfo AutogenerateCode(string code)
        {
            SaleInfo saleInfo = new SaleInfo();

            saleInfo.AutoCode = SaleDataAccess.AutogenerateCode(code);

            return(saleInfo);
        }