roy barlow

roy barlow

  • NA
  • 13
  • 0

passiing values to a form

Mar 19 2008 1:14 PM

I've got a form with some details for a person. I pick up the values on the form and pass them into a person class. What I want to do is open another form and pick up the values I've passed into the Person class, but I'm getting the error... "No overload for method 'frmInvoice' takes '1' argument"

string pName = this.txtName.Text.ToUpper();

string pAddress = this.txtAddress.Text.ToUpper();

string pStatus = this.cboStatus.Text.Substring(0, 1).ToUpper();

DateTime pDoB = DateTime.Parse(this.txtDoB.Text);

//Person Details

Person pPerson = new Person(pName, pDoB, pAddress, pStatus);

//Creates new instance of Invoice form and Pass person class to it

frmInvoice invForm = new frmInvoice(pPerson);

invForm.Show();

Any ideas?

Thanks in advance.

Roy

 


Answers (1)