// Open the Personal Health Record form and hide the login form. private void btnLogin_Click(object sender, EventArgs e) { pchr42563Entities entities = new pchr42563Entities(); //var patient = (from patient in entities.PATIENT_TBL where patient.) Form form3 = new formPersonalHealthRecord(); this.Hide(); form3.Show(); form3.Focus(); }
private void btnRegister_Click(object sender, EventArgs e) { PATIENT_TBL pateint = new PATIENT_TBL() { PATIENT_ID = txtIdNumber.Text, LAST_NAME = txtLastName.Text, FIRST_NAME = txtFirstName.Text, ADDRESS_STREET = string.Empty, ADDRESS_CITY = string.Empty, ADDRESS_STATE = string.Empty, ADDRESS_ZIP = string.Empty, PHONE_HOME = string.Empty, PHONE_MOBILE = string.Empty, PRIMARY_ID = string.Empty }; pchr42563Entities entities = new pchr42563Entities(); entities.PATIENT_TBL.Add(pateint); entities.SaveChanges(); MessageBox.Show("Registration Complete"); this.Close(); }