public winАвтомобиль(DataBaseAdapter adapter)
 {
     InitializeComponent();
     this.adapter = adapter;
     btn_ok.Click += insert_Click;
     cmbClient.ItemsSource = adapter.getNamesClient();
 }
Ejemplo n.º 2
0
 public winSwitchAuto(DataBaseAdapter adapter, Машины car, Клиенты client)
 {
     InitializeComponent();
     this.adapter = adapter;
     this.mCarReferance = car;
     this.mClientReferance = client;
     cmbClient.ItemsSource = adapter.getNamesClient();
 }
 public winАвтомобиль(DataBaseAdapter adapter, Машины car, Клиенты client)
 {
     InitializeComponent();
     this.adapter = adapter;
     this.car = car;
     this.client = client;
     cmbClient.ItemsSource = adapter.getNamesClient();
     btn_ok.Click += update_Click;
     txtName.Text = car.Наименование.Trim();
     txtRun.Text = car.Пробег.Trim();
     cmbClient.Text = client.ФИО_клиента.Trim();
     cmbStatusTO1.Text = car.ТО1.Trim();
     cmbStatusTO2.Text = car.ТО2.Trim();
     cmbStatusTO3.Text = car.ТО3.Trim();
 }
Ejemplo n.º 4
0
        public winСборка(DataBaseAdapter adapter, MyCar car)
        {
            InitializeComponent();
            this.adapter = adapter;
            this.mCar = car;
            cmbClient.ItemsSource = adapter.getNamesClient();
            Товары item = adapter.getEngineById(mCar.get_id_engine());
            switch (car.getSeries())
            {
                case ConstructorView.Series.BMW_1_SERIES:
                    cmbPr.Items.Add("Задний");

                    if (item.Наименование.Contains("136"))
                    {
                        txtName.Text = "BMW 1 Series 116i";
                        txtPrice.Text = "875000 руб.";
                    }
                    else
                    {
                        if (item.Наименование.Contains("170"))
                        {
                            txtName.Text = "BMW 1 Series 118i";
                            txtPrice.Text = "995000 руб.";
                        }
                        else
                        {
                            txtName.Text = "BMW 1 Series 120d";
                            txtPrice.Text = "1120000 руб.";
                        }
                    }
                    break;
                case ConstructorView.Series.BMW_3_SERIES:
                    cmbPr.Items.Add("Задний");
                    if (item.Наименование.Contains("306"))
                    {
                        txtName.Text = "BMW 3 Series 335i";
                        txtPrice.Text = "1900000 руб.";
                    }
                    else
                    {
                        if (item.Наименование.Contains("дизельный"))
                        {
                            txtName.Text = "BMW 3 Series 320d";
                            txtPrice.Text = "1650000 руб.";
                        }
                        else
                        {
                            txtName.Text = "BMW 3 Series 320i";
                            txtPrice.Text = "1350000 руб.";
                        }
                    }
                    break;
                case ConstructorView.Series.BMW_5_SERIES:

                    if (item.Наименование.Contains("184"))
                    {
                        txtName.Text = "BMW 5 Series 520i";
                        txtPrice.Text = "1820000 руб.";
                        cmbPr.Items.Add("Задний");

                    }
                    else
                    {
                        if (item.Наименование.Contains("258"))
                        {
                            txtName.Text = "BMW 5 Series 530d";
                            txtPrice.Text = "2150000 руб.";
                            cmbPr.Items.Add("Задний");

                        }
                        else
                        {
                            txtName.Text = "BMW 5 Series 550i xDrive";
                            txtPrice.Text = "3240000 руб.";
                            cmbPr.Items.Add("Полный");

                        }
                    }
                    break;
                case ConstructorView.Series.BMW_7_SERIES:
                    if (item.Наименование.Contains("250"))
                    {
                        txtName.Text = "BMW 7 Series 730i";
                        txtPrice.Text = "320000 руб.";
                        cmbPr.Items.Add("Задний");
                    }
                    else
                    {
                        if (item.Наименование.Contains("245"))
                        {
                            txtName.Text = "BMW 7 Series 730d";
                            txtPrice.Text = "3500000 руб.";
                            cmbPr.Items.Add("Задний");
                        }
                        else
                        {
                            if (item.Наименование.Contains("407"))
                            {
                                txtName.Text = "BMW 7 Series 750i xDrive";
                                txtPrice.Text = "4650000руб.";
                                cmbPr.Items.Add("Полный");
                            }
                            else
                            {
                                txtName.Text = "BMW 7 Series 760i";
                                txtPrice.Text = "5600000 руб.";
                                cmbPr.Items.Add("Задний");
                            }
                        }
                    }
                    break;
                case ConstructorView.Series.BMW_X5:
                    cmbPr.Items.Add("Полный");
                    if (item.Наименование.Contains("245"))
                    {
                        txtName.Text = "BMW X5 30d";
                        txtPrice.Text = "3028000 руб.";
                    }
                    else
                    {
                        if (item.Наименование.Contains("306"))
                        {
                            txtName.Text = "BMW X5 35i";
                            txtPrice.Text = "2919000 руб.";
                        }
                        else
                        {
                            txtName.Text = "BMW X5 50i";
                            txtPrice.Text = "3718000 руб.";
                        }
                    }
                    cmbColor.Items.Add("Искрящийся");
                    break;

            }
        }