private void loadFields(ClubMember member) { cbUsernames.Text = member.getUsername(); cbStatus.Text = member.status; txtUsername.Text = member.getUsername(); txtNickname.Text = member.nickName; txtFname.Text = member.firstName; txtLname.Text = member.lastName; txtAddress1.Text = member.addressLine1; txtAddress2.Text = member.addressLine2; txtCity.Text = member.city; cbState.Text = member.state; txtZip.Text = member.zip; txtEmail.Text = member.email; txtHomePh.Text = member.homePhone; txtCellPh.Text = member.cellPhone; dtpDOB.Value = member.dateOfBirth; txtEName1.Text = member.emergencyContact1; txtERelation1.Text = member.emergencyContact1Relation; txtEPhone1.Text = member.emergencyContact1Phone; txtEName2.Text = member.emergencyContact2; txtERelation2.Text = member.emergencyContact2Relation; txtEPhone2.Text = member.emergencyContact2Phone; txtInsName.Text = member.insuranceCompanyName; txtInsPolicyNum.Text = member.insurancePolicyNumber; txtInsGroupNum.Text = member.insuranceGroupNumber; }
public static DataTable getMemberTransactions(ClubMember member) { //this returns a list of transactions for one individual //club member string SQL; SQL = "SELECT * FROM transactions where username = '******'"; Debug.WriteLine(SQL); DataTable dt = App.getGenericData(SQL); return(dt); }
private void btnUpdate_Click(object sender, EventArgs e) { ClubMember c = new ClubMember(txtUsername.Text); DialogResult result = DialogResult.OK; if (!txtUsername.Text.Equals(c.getUsername())) { result = MessageBox.Show("Username cannot be updated.\nContinue without updating username?", "Error", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); } if (result.Equals(DialogResult.OK)) { c.status = cbStatus.Text; c.nickName = txtNickname.Text; c.firstName = txtFname.Text; c.lastName = txtLname.Text; c.addressLine1 = txtAddress1.Text; c.addressLine2 = txtAddress2.Text; c.city = txtCity.Text; c.state = cbState.SelectedItem.ToString(); c.zip = txtZip.Text; c.email = txtEmail.Text; c.homePhone = txtHomePh.Text; c.cellPhone = txtCellPh.Text; c.dateOfBirth = dtpDOB.Value.Date; c.emergencyContact1 = txtEName1.Text; c.emergencyContact1Relation = txtERelation1.Text; c.emergencyContact1Phone = txtEPhone1.Text; c.emergencyContact2 = txtEName2.Text; c.emergencyContact2Relation = txtERelation2.Text; c.emergencyContact2Phone = txtEPhone2.Text; c.insuranceCompanyName = txtInsName.Text; c.insurancePolicyNumber = txtInsPolicyNum.Text; c.insuranceGroupNumber = txtInsGroupNum.Text; string str = c.Save(); if (str.Equals("Success")) { btnClear.PerformClick(); } else { MessageBox.Show(str, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
public static DataTable getMemberTransactions(ClubMember member) { //this returns a list of transactions for one individual //club member string SQL; SQL = "SELECT * FROM transactions where username = '******'"; Debug.WriteLine(SQL); DataTable dt = App.getGenericData(SQL); return dt; }