Exemplo n.º 1
0
        //生成下一步对象
        public Flow NextFlow()
        {
            Flow newone = new Flow(this.BelongBooking.Value, this.BelongTrip.Value);
            //   FlowState state;
            switch (State.Value)
            {
                case FlowStateType_BeBooking:
                    newone.State.Value = FlowStateType_Enforcement;
                    break;
                case FlowStateType_Enforcement:
                    newone.State.Value = FlowStateType_Done;
                    break;
                case FlowStateType_Cancel:
                case FlowStateType_Done:
                default:
                    throw new ApplicationException("没有后续的执行的状态");
            }

            //            return new Flow(this.BelongOrder.Value, state, DateTime.Now);
            return newone;
        }
Exemplo 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);
 }
Exemplo 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);
        }