コード例 #1
0
 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();
 }
コード例 #2
0
 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();
 }
コード例 #3
0
ファイル: Car.cs プロジェクト: xjMavericKjx/AutosaloonC
 public void RemoveApplication(Applications application)
 {
     _applicationsForPurchase.Remove(application);
 }
コード例 #4
0
ファイル: Car.cs プロジェクト: xjMavericKjx/AutosaloonC
 public void AddApplication(Applications application)
 {
     _applicationsForPurchase.Add(application);
 }