Exemple #1
0
        public OneAdPage()
        {
            InitializeComponent();

            foreach (var Mark in MarkSQLiteH.GetItems())
            {
                MarkPicker.Items.Add(Mark.Value);
            }
            foreach (var Model in ModelSQLiteH.GetItems())
            {
                ModelPicker.Items.Add(Model.Value);
            }
            foreach (var Kuzov in KuzovSQLiteH.GetItems())
            {
                KuzovPicker.Items.Add(Kuzov.Value);
            }
            foreach (var Year in YearSQLiteH.GetItems())
            {
                YearPicker.Items.Add(Year.Value);
            }
            foreach (var Color in ColorSQLiteH.GetItems())
            {
                ColorPicker.Items.Add(Color.Value);
            }
        }
Exemple #2
0
        public MainInfoEditPage()
        {
            InitializeComponent();

            int CurrentAdId = CrossSettings.Current.GetValueOrDefault("CurrentAdId", 0);

            if (CurrentAdId.Equals(0))
            {
                Navigation.PushModalAsync(new NavigationPage(new MainPage()));
            }
            var AdVM = AdSQLiteH.GetById(CurrentAdId);

            VINEntry.Text     = AdVM.VIN;
            MileageEntry.Text = AdVM.Mileage.ToString();
            SetterRB(SteeringWheelRB, AdVM.SteeringWheel);
            foreach (var Mark in MarkSQLiteH.GetItems())
            {
                MarkPicker.Items.Add(Mark.Value);
            }
            MarkPicker.SelectedIndex = MarkPicker.Items.IndexOf(AdVM.Mark);
            foreach (var Model in ModelSQLiteH.GetItems())
            {
                ModelPicker.Items.Add(Model.Value);
            }
            ModelPicker.SelectedIndex = ModelPicker.Items.IndexOf(AdVM.Model);
            foreach (var Kuzov in KuzovSQLiteH.GetItems())
            {
                KuzovPicker.Items.Add(Kuzov.Value);
            }
            KuzovPicker.SelectedIndex = KuzovPicker.Items.IndexOf(AdVM.Kuzov);
            foreach (var Year in YearSQLiteH.GetItems())
            {
                YearPicker.Items.Add(Year.Value);
            }
            YearPicker.SelectedIndex = YearPicker.Items.IndexOf(AdVM.Year);
            foreach (var Color in ColorSQLiteH.GetItems())
            {
                ColorPicker.Items.Add(Color.Value);
            }
            ColorPicker.SelectedIndex = ColorPicker.Items.IndexOf(AdVM.Color);
        }