private void TextBoxSearch_Leave(object sender, EventArgs e) { TextBoxLogic.LeaveTextBox(sender, "Name, Email, or Phone Number"); TextBox passedBox = (TextBox)sender; if (passedBox.Text == "Name, Email, or Phone Number") { RefreshTable(); } }
//CREATE ENUMS OR COLLECTION TO CLEAN UP CODE AND MAYBE TRANSFER FUCTIONS TO TEXTBOXLOGIC public void EnterAllFields() { TextBoxLogic.EnterTextBox(textBoxFirstName, "First Name"); TextBoxLogic.EnterTextBox(textBoxLastName, "Last Name"); TextBoxLogic.EnterTextBox(textBoxEmail, "*****@*****.**"); TextBoxLogic.EnterTextBox(textBoxPhoneNumber, "xxx-xxx-xxxx"); TextBoxLogic.EnterTextBox(textBoxFromStreet, "Street"); TextBoxLogic.EnterTextBox(textBoxFromCity, "City"); TextBoxLogic.EnterTextBox(textBoxFromState, "ST"); TextBoxLogic.EnterTextBox(textBoxFromZipCode, "Zip Code"); TextBoxLogic.EnterTextBox(textBoxToStreet, "Street"); TextBoxLogic.EnterTextBox(textBoxToCity, "City"); TextBoxLogic.EnterTextBox(textBoxToState, "ST"); TextBoxLogic.EnterTextBox(textBoxToZipCode, "Zip Code"); TextBoxLogic.EnterTextBox(textBoxRoomCount, "xx"); TextBoxLogic.EnterTextBox(textBoxNotes, "Additional Information"); }
public void ResetTextBoxes() { userInfo.CustomerID = 0; TextBoxLogic.ResetTextBox(textBoxFirstName, "First Name"); TextBoxLogic.ResetTextBox(textBoxLastName, "Last Name"); TextBoxLogic.ResetTextBox(textBoxEmail, "*****@*****.**"); TextBoxLogic.ResetTextBox(textBoxPhoneNumber, "xxx-xxx-xxxx"); TextBoxLogic.ResetTextBox(textBoxFromStreet, "Street"); TextBoxLogic.ResetTextBox(textBoxFromCity, "City"); TextBoxLogic.ResetTextBox(textBoxFromState, "ST"); TextBoxLogic.ResetTextBox(textBoxFromZipCode, "Zip Code"); TextBoxLogic.ResetTextBox(textBoxToStreet, "Street"); TextBoxLogic.ResetTextBox(textBoxToCity, "City"); TextBoxLogic.ResetTextBox(textBoxToState, "ST"); TextBoxLogic.ResetTextBox(textBoxToZipCode, "Zip Code"); TextBoxLogic.ResetTextBox(textBoxRoomCount, "xx"); TextBoxLogic.ResetTextBox(textBoxNotes, "Additional Information"); TextBoxLogic.ResetTextBox(textBoxSearch, "Name, Email, or Phone Number"); RefreshTable(); }
private void TextBoxSearch_Enter(object sender, EventArgs e) { TextBoxLogic.EnterTextBox(sender, "Name, Email, or Phone Number"); }
private void TextBoxNotes_Leave(object sender, EventArgs e) { TextBoxLogic.LeaveTextBox(sender, "Additional Information"); }
private void TextBoxNotes_Enter(object sender, EventArgs e) { TextBoxLogic.EnterTextBox(sender, "Additional Information"); }
private void TextBoxEmail_Leave(object sender, EventArgs e) { TextBoxLogic.LeaveTextBox(sender, "*****@*****.**"); }
private void TextBoxFirstName_Leave(object sender, EventArgs e) { TextBoxLogic.LeaveTextBox(sender, "First Name"); }
private void TextBoxRoomCount_Leave(object sender, EventArgs e) { TextBoxLogic.LeaveTextBox(sender, "xx"); }
private void TextBoxToState_Enter(object sender, EventArgs e) { TextBoxLogic.EnterTextBox(sender, "ST"); }
private void TextBoxToCity_Leave(object sender, EventArgs e) { TextBoxLogic.LeaveTextBox(sender, "City"); }
private void TextBoxToCity_Enter(object sender, EventArgs e) { TextBoxLogic.EnterTextBox(sender, "City"); }
private void TextBoxFromStreet_Leave(object sender, EventArgs e) { TextBoxLogic.LeaveTextBox(sender, "Street"); }
private void TextBoxFromStreet_Enter(object sender, EventArgs e) { TextBoxLogic.EnterTextBox(sender, "Street"); }
private void TextBoxPhoneNumber_Leave(object sender, EventArgs e) { TextBoxLogic.LeaveTextBox(sender, "xxx-xxx-xxxx"); }
private void TextBoxPhoneNumber_Enter(object sender, EventArgs e) { TextBoxLogic.EnterTextBox(sender, "xxx-xxx-xxxx"); }
private void TextBoxRoomCount_Enter(object sender, EventArgs e) { TextBoxLogic.EnterTextBox(sender, "xx"); }
private void TextBoxToState_Leave(object sender, EventArgs e) { TextBoxLogic.LeaveTextBox(sender, "ST"); }
private void TextBoxToZipCode_Enter(object sender, EventArgs e) { TextBoxLogic.EnterTextBox(sender, "Zip Code"); }
private void TextBoxToZipCode_Leave(object sender, EventArgs e) { TextBoxLogic.LeaveTextBox(sender, "Zip Code"); }
private void TextBoxLastName_Enter(object sender, EventArgs e) { TextBoxLogic.EnterTextBox(sender, "Last Name"); }
private void TextBoxEmail_Enter(object sender, EventArgs e) { TextBoxLogic.EnterTextBox(sender, "*****@*****.**"); }