public void initOrgs(OrganizationRepo or) { // 1 2 3 4 5 6 7 8 string[] orgs = { "McDonald's", "Dairy Queen", "Chili's", "Applebee's", "Buffalo Wild Wings", "Taco Bell", "Tasty China House", "Domino's" }; foreach (string org in orgs) { or.CreateOrganization(org); } }
private void button1_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(cOrgNameTextBox.Text)) { OrganizationRepo or = new OrganizationRepo(); Organization o = or.CreateOrganization(cOrgNameTextBox.Text); IReadOnlyList <Organization> l = or.RetrieveOrganizations(); //Organization org = o.GetOrganization(13); cOrgIdNumLabel.Text = o.OrganizationID.ToString(); cRestOrgComboBox.Items.Add(cOrgNameTextBox.Text); orgListBox.Items.Add(cOrgNameTextBox.Text); cSelectOrgExpendComboBox.Items.Add(cOrgNameTextBox.Text); } else { MessageBox.Show("Organization name cannot be empty"); } }