private Product CreateProduct() { Producer producer = new Producer(producerOrganizationText.Text, producerCountryText.Text, producerTelephoneText.Text, producerAdressText.Text); Stockman stockman = new Stockman(stockmanFNameText.Text, stockmanSName.Text, stockmanLName.Text, lessFivebutton.Name, stockmanAdressText.Text); Product product = new Product(productNameText.Text, productNumberText.Text, productmassTrack.Value, productTypeText.Text, productDate.TodayDate, producer, stockman); return(product); }
public Product(string name, string number, int mass, string type, DateTime date, Producer producer, Stockman stockman) { this.Name = name; this.number = number; this.mass = mass; this.type = type; this.date = date; this.producer = producer; this.stockman = stockman; }
private Product CreateProduct() { Producer producer = new Producer(producerOrganizationText.Text, producerCountryText.Text, producerTelephoneText.Text, producerAdressText.Text); Stockman stockman = new Stockman(stockmanFNameText.Text, stockmanSName.Text, stockmanLName.Text, lessFivebutton.Name, stockmanAdressText.Text); Product product = new Product(productNameText.Text, productNumberText.Text, productmassTrack.Value, productTypeText.Text, Convert.ToDouble(productPriceText.Text), producer, stockman, dateCalender.SelectionStart); return(product); }