paultit_
❔ Need Help with windows form program
private void submitButton_Click(object sender, EventArgs e)
{
if (ValidateForm())
{
PersonalInformation pModel = new PersonalInformation(
firstNameTxtBox.Text,
middleNameTxtBox.Text,
lastNameTxtBox.Text,
ageTxtBox.Text);
myAddress adModel = new myAddress(
cityTxtBox.Text,
barangayTxtBox.Text,
streetTxtBox.Text,
housenumTxtBox.Text);
userInfo userModel = new userInfo(
userNameTxtBox.Text,
passwordTxtBox.Text);
cardInformation cardModel = new cardInformation(
pinCodeTxtBox.Text
);
foreach (IatmDataConnection db in GlobalConfig.Connections)
{
db.personalInformationReg(pModel);
db.myAddressReg(adModel);
db.userInfoReg(userModel);
db.cardInformationReg(cardModel);
}
}
else
{
MessageBox.Show("This form has an Invalid information. Please Check it and try again.");
}
private void submitButton_Click(object sender, EventArgs e)
{
if (ValidateForm())
{
PersonalInformation pModel = new PersonalInformation(
firstNameTxtBox.Text,
middleNameTxtBox.Text,
lastNameTxtBox.Text,
ageTxtBox.Text);
myAddress adModel = new myAddress(
cityTxtBox.Text,
barangayTxtBox.Text,
streetTxtBox.Text,
housenumTxtBox.Text);
userInfo userModel = new userInfo(
userNameTxtBox.Text,
passwordTxtBox.Text);
cardInformation cardModel = new cardInformation(
pinCodeTxtBox.Text
);
foreach (IatmDataConnection db in GlobalConfig.Connections)
{
db.personalInformationReg(pModel);
db.myAddressReg(adModel);
db.userInfoReg(userModel);
db.cardInformationReg(cardModel);
}
}
else
{
MessageBox.Show("This form has an Invalid information. Please Check it and try again.");
}
5 replies