private void btnBack_Click(object sender, EventArgs e) { int statusID = Convert.ToInt32(lblStatusID.Text); AdminOrganization adminOrganization = new AdminOrganization(lblYearID.Text, lblYear.Text, statusID, lblStatus.Text); adminOrganization.Show(); this.Close(); }
private void btnCreate_Click(object sender, EventArgs e) { if (txtNewOrgName.Text == "") { MessageBox.Show("Please fill up the form!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { int OrganizationEchelon = (int)cboOrgEchelon.SelectedValue; int StatusID = Convert.ToInt32(lblStatusID.Text); int YearID = Convert.ToInt32(lblYearID.Text); myData.AddOrganization(txtNewOrgName.Text, OrganizationEchelon, StatusID, YearID, txtOrganizationCode.Text); //Parameters to pass to DataAccess class MessageBox.Show("Organization Added!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); AdminOrganization admin = new AdminOrganization(lblYearID.Text, lblYear.Text, StatusID, lblStatus.Text); admin.Show(); this.Close(); } }