public winSwitchAuto(DataBaseAdapter adapter, Машины car, Клиенты client) { InitializeComponent(); this.adapter = adapter; this.mCarReferance = car; this.mClientReferance = client; cmbClient.ItemsSource = adapter.getNamesClient(); }
public void init(DataBaseAdapter adapter) { this.adapter = adapter; car = new Машины(); client = new Клиенты(); winSwitchAuto win = new winSwitchAuto(adapter, car, client); win.ShowDialog(); initCarInfo(); }
private void btn_ok_Click(object sender, RoutedEventArgs e) { try { mCarReferance = adapter.getCarByName(cmbCars.Text, cmbClient.Text); mClientReferance = adapter.getClientByName(cmbClient.Text); this.Close(); } catch (Exception ex) { MessageBox.Show("Неверный ввод", "Внимание", MessageBoxButton.OK, MessageBoxImage.Warning); } }
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(); }
/// <summary> /// Deprecated Method for adding a new object to the Машины EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToМашины(Машины машины) { base.AddObject("Машины", машины); }
/// <summary> /// Create a new Машины object. /// </summary> /// <param name="id_машины">Initial value of the id_машины property.</param> /// <param name="наименование">Initial value of the Наименование property.</param> /// <param name="пробег">Initial value of the Пробег property.</param> /// <param name="id_клиента">Initial value of the id_клиента property.</param> /// <param name="тО1">Initial value of the ТО1 property.</param> /// <param name="тО2">Initial value of the ТО2 property.</param> /// <param name="тО3">Initial value of the ТО3 property.</param> public static Машины CreateМашины(global::System.Int32 id_машины, global::System.String наименование, global::System.String пробег, global::System.Int32 id_клиента, global::System.String тО1, global::System.String тО2, global::System.String тО3) { Машины машины = new Машины(); машины.id_машины = id_машины; машины.Наименование = наименование; машины.Пробег = пробег; машины.id_клиента = id_клиента; машины.ТО1 = тО1; машины.ТО2 = тО2; машины.ТО3 = тО3; return машины; }