Пример #1
0
 public TrackingViewModel(ShipmentBaseRequest requestObject)
 {
     TrackingList       = new ObservableCollection <TrackingModelView>();
     trackingService    = new ShipmentTrackingService();
     this.requestObject = requestObject;
     LoadData();
 }
Пример #2
0
 public ReferenceViewModel(ShipmentBaseRequest requestObject)
 {
     ReferenceList      = new ObservableCollection <Reference>();
     trackingService    = new ShipmentTrackingService();
     this.requestObject = requestObject;
     LoadData();
 }
Пример #3
0
 public AddressViewModel(ShipmentBaseRequest requestObject)
 {
     AddressList        = new ObservableCollection <AddressParty>();
     trackingService    = new ShipmentTrackingService();
     this.requestObject = requestObject;
     LoadData();
 }
        public JobDetailsTabbedPage(ShipmentModelView shipment)
        {
            this.shipment = shipment;
            InitializeComponent();
            JobName.Text = shipment.JobReferenceNumber;

            TransportType = shipment.TransportTypeName;

            ShipmentBaseRequest requestObject = new ShipmentBaseRequest()
            {
                JobId   = shipment.JobId,
                JobType = shipment.JobType
            };

            //TransportType dependent if/else
            if (TransportType == "Air")//Plane
            {
                Children.Add(new Overview(shipment));
                Children.Add(new JobDetailsPages.Tracking(requestObject));
                Children.Add(new Address(requestObject));
                Children.Add(new ReferenceView(requestObject));
                //Children.Add(new JobDetailsPages.Container(requestObject));
                Children.Add(new Carrier(requestObject));
                Children.Add(new JobDetailsPages.Document(requestObject));
            }
            else if (TransportType == "Sea")//Ship
            {
                Children.Add(new Overview(shipment));
                Children.Add(new JobDetailsPages.Tracking(requestObject));
                Children.Add(new Address(requestObject));
                Children.Add(new ReferenceView(requestObject));
                Children.Add(new JobDetailsPages.Container(requestObject));
                Children.Add(new Carrier(requestObject));
                Children.Add(new JobDetailsPages.Document(requestObject));
            }
            else if (TransportType == "Land")//Truck
            {
                Children.Add(new Overview(shipment));
                Children.Add(new JobDetailsPages.Tracking(requestObject));
                Children.Add(new Address(requestObject));
                Children.Add(new ReferenceView(requestObject));
                Children.Add(new JobDetailsPages.Container(requestObject));
                Children.Add(new Carrier(requestObject));
                Children.Add(new JobDetailsPages.Document(requestObject));
            }
        }
Пример #5
0
 public CarrierViewModel(ShipmentBaseRequest requestObject)
 {
     //CarrierList = new ObservableCollection<CarrierDetails>()
     //{
     //    new CarrierDetails()
     //    {
     //        CarrierDate = "July 10 2019 12:26 PM",
     //        CarrierVisibility = true,
     //        CarrierTitle = "In gate",
     //        CarrierDescription = "CONTAINER: MRKU4772644 40HC VESSEL: CMA CGM NERVAL LOCATION: FELIXSTOWE.",
     //        CarrierImage = "timeline.png"
     //    },
     //    new CarrierDetails()
     //    {
     //        CarrierDate = "July 18 2019 11:46 AM",
     //        CarrierVisibility = true,
     //        CarrierTitle = "Loaded on vessel",
     //        CarrierDescription = "CONTAINER: MRKU4772644 40HC VESSEL: CMA CGM NERVAL LOCATION: FELIXSTOWE.",
     //        CarrierImage = "timeline.png"
     //    },
     //    new CarrierDetails()
     //    {
     //        CarrierDate = "July 18 2019 07:46 PM",
     //        CarrierVisibility = true,
     //        CarrierTitle = "Vessel deprature",
     //        CarrierDescription = "CONTAINER: MRKU4772644 40HC VESSEL: CMA CGM NERVAL LOCATION: FELIXSTOWE.",
     //        CarrierImage = "timelinebold.png"
     //    },
     //    new CarrierDetails()
     //    {
     //        CarrierDate = "October 05 2019 12:31 AM",
     //        CarrierVisibility = false,
     //        CarrierTitle = "Vessel arrival",
     //        CarrierDescription = "CONTAINER: MRKU4772644 40HC VESSEL: CMA CGM NERVAL LOCATION: AMBARLI.",
     //        CarrierImage = "timeline.png"
     //    },
     //};
     trackingService    = new ShipmentTrackingService();
     this.requestObject = requestObject;
     LoadData();
 }
Пример #6
0
 public DocumentViewModel(ShipmentBaseRequest requestObject)
 {
 }
Пример #7
0
 public Tracking(ShipmentBaseRequest requestObject)
 {
     InitializeComponent();
     BindingContext = tvm = new TrackingViewModel(requestObject);
 }
Пример #8
0
 public Address(ShipmentBaseRequest requestObject)
 {
     InitializeComponent();
     BindingContext = avm = new AddressViewModel(requestObject);
 }
Пример #9
0
 public Container(ShipmentBaseRequest requestObject)
 {
     InitializeComponent();
     BindingContext = cvm = new ContainerViewModel(requestObject);
 }
Пример #10
0
 public ReferenceView(ShipmentBaseRequest requestObject)
 {
     InitializeComponent();
     BindingContext = rvm = new ReferenceViewModel(requestObject);
 }
Пример #11
0
        public JobDetailsViewModel(ShipmentModelView shipment)
        {
            type = shipment.TransportTypeName;
            ShipmentBaseRequest requestObject = new ShipmentBaseRequest()
            {
                JobId   = shipment.JobId,
                JobType = shipment.JobType
            };

            if (type == "Air")//Plane
            {
                //Set visibility
                OverviewVisible   = true;
                TrackingVisible   = true;
                ReferencesVisible = true;
                AddressesVisible  = true;
                CarrierVisible    = true;
                ContainerVisible  = false;
                DocumentVisible   = true;
                MapVisible        = false;

                //Set Order
                OverviewPosition   = 0;
                TrackingPosition   = 1;
                AddressesPosition  = 2;
                ReferencesPosition = 3;
                CarrierPosition    = 4;
                DocumentPosition   = 5;
                //MapPosition = ;
                //ContainerPosition = 4;


                MyItemsSource = new ObservableCollection <View>()
                {
                    //Customize View collection
                    new Views.JobDetailsViews.Overview(shipment),
                    new  Views.JobDetailsViews.Tracking(requestObject),
                    new  Views.JobDetailsViews.Address(requestObject),
                    new  Views.JobDetailsViews.ReferenceView(requestObject),
                    //new  Views.JobDetailsViews.Container(requestObject),
                    new  Views.JobDetailsViews.Carrier(requestObject),
                    new  Views.JobDetailsViews.Document(requestObject),
                    //new  Views.JobDetailsViews.Map(),
                };
            }
            else if (type == "Sea")//Ship
            {
                //Set visibility
                OverviewVisible   = true;
                TrackingVisible   = true;
                ReferencesVisible = true;
                AddressesVisible  = true;
                CarrierVisible    = true;
                ContainerVisible  = true;
                DocumentVisible   = true;
                MapVisible        = false;

                //Set Order
                OverviewPosition   = 0;
                TrackingPosition   = 1;
                AddressesPosition  = 2;
                ReferencesPosition = 3;
                CarrierPosition    = 5;
                DocumentPosition   = 6;
                //MapPosition = ;
                ContainerPosition = 4;


                MyItemsSource = new ObservableCollection <View>()
                {
                    //Customize View collection
                    new Views.JobDetailsViews.Overview(shipment),
                    new  Views.JobDetailsViews.Tracking(requestObject),
                    new  Views.JobDetailsViews.Address(requestObject),
                    new  Views.JobDetailsViews.ReferenceView(requestObject),
                    new  Views.JobDetailsViews.Container(requestObject),
                    new  Views.JobDetailsViews.Carrier(requestObject),
                    new  Views.JobDetailsViews.Document(requestObject),
                    //new  Views.JobDetailsViews.Map(),
                };
            }
            else if (type == "Land")//Truck
            {
                //Set visibility
                OverviewVisible   = true;
                TrackingVisible   = true;
                ReferencesVisible = true;
                AddressesVisible  = true;
                CarrierVisible    = true;
                ContainerVisible  = true;
                DocumentVisible   = true;
                MapVisible        = false;

                //Set Order
                OverviewPosition   = 0;
                TrackingPosition   = 1;
                AddressesPosition  = 2;
                ReferencesPosition = 3;
                CarrierPosition    = 5;
                DocumentPosition   = 6;
                //MapPosition = ;
                ContainerPosition = 4;


                MyItemsSource = new ObservableCollection <View>()
                {
                    //Customize View collection
                    new Views.JobDetailsViews.Overview(shipment),
                    new  Views.JobDetailsViews.Tracking(requestObject),
                    new  Views.JobDetailsViews.Address(requestObject),
                    new  Views.JobDetailsViews.ReferenceView(requestObject),
                    new  Views.JobDetailsViews.Container(requestObject),
                    new  Views.JobDetailsViews.Carrier(requestObject),
                    new  Views.JobDetailsViews.Document(requestObject),
                    //new  Views.JobDetailsViews.Map(),
                };
            }

            //No need to get in the if - else
            //Generate Grid binded object
            ViewrelationObjectList = new List <viewrelationObject>()
            {
                new viewrelationObject()
                {
                    Position = OverviewPosition,
                    Pointer  = "Overview"
                },
                new viewrelationObject()
                {
                    Position = TrackingPosition,
                    Pointer  = "Tracking"
                },
                new viewrelationObject()
                {
                    Position = AddressesPosition,
                    Pointer  = "Addresses"
                },
                new viewrelationObject()
                {
                    Position = ReferencesPosition,
                    Pointer  = "Reference"
                },
                new viewrelationObject()
                {
                    Position = ContainerPosition,
                    Pointer  = "Container"
                },
                new viewrelationObject()
                {
                    Position = CarrierPosition,
                    Pointer  = "Carrier"
                },
                new viewrelationObject()
                {
                    Position = DocumentPosition,
                    Pointer  = "Document"
                },
                new viewrelationObject()
                {
                    Position = MapPosition,
                    Pointer  = "Map"
                }
            };
        }
Пример #12
0
 public Document(ShipmentBaseRequest requestObject)
 {
     InitializeComponent();
     BindingContext = dvm = new DocumentViewModel(requestObject);
 }
Пример #13
0
 public ContainerViewModel(ShipmentBaseRequest requestObject)
 {
 }