Esempio n. 1
0
 public Trip(Booking prebooking)
 {
     this.CreateFromView();
     InitializationObjcet(-1, prebooking, DateTime.Now, new Vehicle(), new Driver(), string.Empty, new Address(), new Address(), string.Empty, PayState_Unpay, 1000.0f, TripSettlementType_Cash, new Flow(prebooking, this));
 }
Esempio n. 2
0
 public Trip(int tid, int oid, Booking bookingoid, DateTime pickupitem, Vehicle car, Driver driver, string mainpassager, Address starting, Address destination, string flight, int paystate, float quote, int settlement, Flow state, bool iscover)
 {
     this.CreateFromDB(tid, iscover);
     InitializationObjcet(oid, bookingoid, pickupitem, car, driver, mainpassager, starting, destination, flight, paystate, quote, settlement, state);
 }
Esempio n. 3
0
        private void InitializationObjcet(int oid, Booking bookingoid, DateTime pickupitem, Vehicle car, Driver driver, string mainpassager, Address starting, Address destination, string flight, int paystate, float quote, int settlement, Flow state)
        {
            ObjID = new ComboValue<int>(TripOid, oid);
            Booking = new ComboValue<Booking>(TripBookingOID, bookingoid);

            this.PickUpTime = new ComboValue<DateTime>(TripPickUpTime, pickupitem);
            this.Car = new ComboValue<Vehicle>(TripCar, car);
            this.Driver = new ComboValue<Driver>(TripDriver, driver);
            this.MainPassager = new ComboValue<string>(TripMainPassager, mainpassager);
            this.StartingAddress = new ComboValue<Address>(TripStartingAddress, starting);
            this.DestinationAddress = new ComboValue<Address>(TripDestinationAddress, destination);
            this.Settlement = new ComboValue<int>(TripSettlement, settlement);
            this.Quote = new ComboValue<float>(TripQuote, quote);
            this.PayState = new ComboValue<int>(TripPayState, paystate);
            this.State = new ComboValue<Flow>(TripState, state);
            this.Flight = new ComboValue<string>(TripFlightMsg, flight);
        }
Esempio n. 4
0
        public static Trip NewTrip(Booking prebooking)
        {
            Trip Trip = new Trip(prebooking);

            //Trip.Booking.Value = prebooking;
            return Trip;
        }
Esempio n. 5
0
        public Flow(int tid, Booking orderid, Trip trip, int flow, DateTime timemark, bool IsCover)
        {
            this.CreateFromDB(tid, IsCover);

            InitializationObjcet(orderid, trip, flow, timemark);
        }
Esempio n. 6
0
 public Flow(Booking booking, Trip trip)
 {
     this.CreateFromView();
     InitializationObjcet(booking, trip, FlowStateType_BeBooking, DateTime.Now);
 }
Esempio n. 7
0
        private void InitializationObjcet(Booking booking, Trip belongtrip, int flow, DateTime timemark)
        {
            BelongBooking = new ComboValue<Booking>(FlowBelongTripOId, booking);
            BelongTrip = new ComboValue<Trip>(FlowBelongTripOId, belongtrip);

            State = new ComboValue<int>(FlowState, flow);

            TimeMark = new ComboValue<DateTime>(FlowTimeMark, timemark);
        }