private void CreateApplicationButton_Click(object sender, System.EventArgs e) { if (ApplicationInStockRadioButton.Checked) { Application = new UIApplicationsInStock(NameOfBuyerTextBox.Text, _car) { CellNumber = CallNumberTextBox.Text }; } if (ApplicationOfDeliveryRadioButton.Checked) { Application = new UIApplicationsForDelayedDelivery(NameOfBuyerTextBox.Text, _car, Convert.ToInt32(PercentTextBox.Text)) { CellNumber = CallNumberTextBox.Text }; } DialogResult = DialogResult.OK; Close(); }
public CalculateApplicationForm(Applications application) { _application = application; InitializeComponent(); NameOfBuyerValueLabel.Text = _application.NameOfBuyer; CallNumberValueLabel.Text = _application.CellNumber; if (_application is UIApplicationsForDelayedDelivery) { var app = (UIApplicationsForDelayedDelivery)_application; PercentValueLabel.Text = app.SalePercent.ToString()+" %"; } if (_application is UIApplicationsInStock) { PercentLabel.Visible = false; } CarInformationLabel.Text = Rus_Resources.CalculateApplicationForm_CalculateApplicationForm_CarModel + _application.Car.Name + Rus_Resources.CalculateApplicationForm_CalculateApplicationForm_CarCost + _application.СalculateCost(); }
public void RemoveApplication(Applications application) { _applicationsForPurchase.Remove(application); }
public void AddApplication(Applications application) { _applicationsForPurchase.Add(application); }