Sub btnRegister_Click(sender As Object, e As EventArgs) 

   dim myProject as new ProjectPal.bo.boProject
   dim projectData as new projectpal.bo.structProject()
   dim staffData as new projectpal.bo.structStaff()
   dim stageData as new arraylist()

   'wypenienie struktury staffData 
   staffData.id = 0
   staffData.firstname = txtfirstname.Text
   staffData.lastname = txtlastname.Text
   staffData.email = txtemail.Text
   staffData.password = txtpassword1.Text
   staffData.isPM = 1

   
   'wypenienie struktury projectData 
   projectData.id = 0
   projectData.name = txtProject.text
   projectData.description = txtDescription.text
   projectData.startDate = txtStartDate.text
   projectData.endDate = txtEndDate.text
   projectData.PMID = 0

   'wypenienie tablicy Stages 
   stageData.add(txtStage1.text)
   stageData.add(txtStage2.text)
   stageData.add(txtStage3.text)
   stageData.add(txtStage4.text)

   if myproject.Create(staffData, projectData, stageData) then
      formsauthentication.SetAuthCookie(txtemail.text, false)
      response.redirect("browser/projectDesk.aspx")
   end if


end sub
