Cecil,
OK, as Gary said, you need to have a constructor in your Biz_Tier class that takes two paramters if you want to instantiate your Biz_Tier class this way. But, I bet what you really want is just to call a method on the Biz_Tier class that returns your TotalPrice, rather than pass those two parms into the constructor of the class. So, your code would be something like this:
private void addButton_Click(object sender, EventArgs e)
{
Biz_Tier aOrder = new Biz_Tier();
this.TotalPriceTextBox.Text = aOrder.GetTotalPrice(this.unitPriceTextBox.Text, this.unitsTextBox.Text);
}
~~Bonnie
>Well, it is middle tier. I am in a C# class in whcih we were given very little of any guidance and were only told to have a business tier, a very simple one. We obtain the data in the first form from an ACCESS database wherein we display a Price and the number of units and the number of untis times that price to get a total price for clkeanign a home's carpets.
>
>We call the biz_tier with two parameters inside the parens such as:
>(From the main form called JobForm).
>
>
> private void quoteButton_Click(object sender, EventArgs e)
> {
> quoteForm openForm = new quoteForm(); // instantiate the openForm object from the quoteForm form.
> openForm.Show();
> }
>
> private void addButton_Click(object sender, EventArgs e)
> {
> //Instantiate a business tier object.
>
> Biz_Tier aOrder = new
> Biz_Tier(this.unitPriceTextBox.Text, this.unitsTextBox.Text);
> }
>
>
>We (our group) have two buttons, one being the add button mentioned above.
>
>We want to display the value of the number of units times the price of those untis multiplied.
>
>I keep getting an error thqt says: "No overload for method Biz_Tier, takes 2 arguments."
>
>Cecil