public FlightCrewVoyageRecord(object viewObject, string modelname)
        {
            try
            {
                InitializeComponent();
                _flightcrew = (FlightCrewVoyageRecordModel)viewObject;
                _flightcrew.ScheduledDeparture = DateTime.Now;
                this.BindingContext            = _flightcrew;

                BindFlightNumbers();
                BindAricraftRegs();

                ReportRaisedByEntry.DataSource = App.peoplePickerDataSource;
                if (!string.IsNullOrEmpty(_flightcrew.ReportRaisedBy))
                {
                    var selectedItem = App.peoplePickerDataSource.Find(x => { return(Convert.ToString(x.Id) == _flightcrew.ReportRaisedBy); });
                    if (selectedItem != null)
                    {
                        ReportRaisedByEntry.Text         = selectedItem.Name;
                        ReportRaisedByEntry.SelectedItem = selectedItem;
                    }
                }

                _attachementView = new AttachmentView();
                stkAttachment.Children.Add(_attachementView);
            }
            catch (Exception ex)
            {
            }
        }
Example #2
0
        public StationInformation(object viewObject)
        {
            _StationInformation = (Models.StationInformationModel)viewObject;
            this.BindingContext = _StationInformation;
            InitializeComponent();

            _attachementView = new AttachmentView();
            //stkAttachment.Children.Add(_attachementView);
        }
        public SSIRShortForm(object viewObject, string modelname)
        {
            try
            {
                BindingContext = viewObject;
                _classname     = modelname;
                _viewobject    = viewObject;
                InitializeComponent();

                _attachementView = new AttachmentView();
                stkAttachment.Children.Add(_attachementView);

                BindFlightNumbers();
                BindAricraftRegs();

                BindMORPicker();
                SetSubmitterInfo(viewObject);
            }
            catch (Exception ex)
            {
            }
        }