private void button24_Click(object sender, EventArgs e) { //Do a where ID is X.get the OrgType and Save it so I can OrganisationType InsightOrgType = new OrganisationType(); InsightOrgType.OrganisationTypeDescription = OrgTypeTb.Text; UpdateOrgTypeTab.SelectedIndex = 2; }
private void AOTConfirmBtn_Click(object sender, EventArgs e) { OrganisationType InsightOrgType = new OrganisationType(); InsightOrgType.OrganisationTypeDescription = OrgType; using (InsightEntities db = new InsightEntities()) { db.OrganisationTypes.Add(InsightOrgType); db.SaveChanges(); AddOrganisationTypeTab.SelectedIndex = 2; } }