public JobDetailsPage(ShipmentModelView shipment) { this.shipment = shipment; InitializeComponent(); JobName.Text = shipment.JobReferenceNumber; BindingContext = dvm = new JobDetailsViewModel(shipment); OverviewContainer.GestureRecognizers.Add( new TapGestureRecognizer() { Command = new Command(() => tabClick(dvm.OverviewPosition)) }); TrackingContainer.GestureRecognizers.Add( new TapGestureRecognizer() { Command = new Command(() => tabClick(dvm.TrackingPosition)) }); AddressesContainer.GestureRecognizers.Add( new TapGestureRecognizer() { Command = new Command(() => tabClick(dvm.AddressesPosition)) }); ReferencesContainer.GestureRecognizers.Add( new TapGestureRecognizer() { Command = new Command(() => tabClick(dvm.ReferencesPosition)) }); CarrierContainer.GestureRecognizers.Add( new TapGestureRecognizer() { Command = new Command(() => tabClick(dvm.CarrierPosition)) }); ContainerContainer.GestureRecognizers.Add( new TapGestureRecognizer() { Command = new Command(() => tabClick(dvm.ContainerPosition)) }); DocumentContainer.GestureRecognizers.Add( new TapGestureRecognizer() { Command = new Command(() => tabClick(dvm.DocumentPosition)) }); MapContainer.GestureRecognizers.Add( new TapGestureRecognizer() { Command = new Command(() => tabClick(dvm.MapPosition)) }); relatedObject = dvm.ViewrelationObjectList; LastSelected = new BoxView(); }
//For Notifiaction Tapped From Sys.Trey public MainPage(ShipmentModelView s) { if (!B2CConstants.tokenRequested) { _showSignin(); } InitializeComponent(); BindingContext = viewModel = new MainViewModel(); if (s != null) { NotificationViewModel.UpdateNotifications(Constants.Notification_VM_Instance); MainViewModel.UpdateBadgeAttributes(viewModel, true); Navigation.PushAsync(new JobDetailsTabbedPage((ShipmentModelView)s)); } }
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)); } }
public Overview(ShipmentModelView shipment) { InitializeComponent(); BindingContext = new OverviewViewModel(shipment); }
public OverviewViewModel(ShipmentModelView shipment) { ShipmentImage = shipment.ShipmentImageOverview; JobReferenceNumber = shipment.JobReferenceNumber; Place_Date = shipment.Place_Date; OverviewList = new List <Keyvalue>() { new Keyvalue() { Key = OverView.Trasport_Type, Value = shipment.TransportTypeName, }, new Keyvalue() { Key = OverView.Customer_Reference, Value = shipment.CustomerReference, }, new Keyvalue() { Key = OverView.Job_Reference, Value = shipment.JobReferenceNumber, }, new Keyvalue() { Key = OverView.Place_Of_Receipt, Value = shipment.PlaceOfReceipt, }, new Keyvalue() { Key = OverView.Vessel_Name, Value = shipment.VesselName, }, new Keyvalue() { Key = OverView.Port_Of_Loading, Value = shipment.PortOfLoading, }, new Keyvalue() { Key = OverView.Port_of_Discharge, Value = shipment.PortOfLoading, }, new Keyvalue() { Key = OverView.Final_Destination, Value = shipment.PortOfLoading, }, new Keyvalue() { Key = OverView.ETA, Value = shipment._ETA, }, new Keyvalue() { Key = OverView.Pieces, Value = shipment.Pieces, }, new Keyvalue() { Key = OverView.ShipperName, Value = shipment.ShipperName, }, new Keyvalue() { Key = OverView.ConsigeeName, Value = shipment.ConsigneeName, } }; }
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" } }; }