private void buttonInsertBand_Click(object sender, EventArgs e) { if (textBoxBandName.Text == "" || textBoxDescription.Text == "") { MessageBox.Show("Wrong input!"); return; } IBandsRepository bandsRep = new BandsRepository(); BandModel toPost = new BandModel(); toPost.BandName = textBoxBandName.Text; toPost.DiscriptionOfType = textBoxDescription.Text; bool flag = bandsRep.AddBand(toPost); if (flag) { MessageBox.Show("Posted!"); } else { MessageBox.Show("Error!"); } textBoxBandName.Text = ""; textBoxDescription.Text = ""; }