private void buttonModify_Click(object sender, EventArgs e) { FakeRequirementRepository Freq = new FakeRequirementRepository(); Requirement req = new Requirement(); string error; req.ProjectID = _ProjectID; req.FeatureID = _NewFeatID; req.ID = _RequirementID; req.Statement = textBoxState.Text; error = Freq.Modify(req); if (error != "") { MessageBox.Show(error, "Attention"); } else { MessageBox.Show("Requirement Successfully Modified!", "Attention"); this.Close(); } }
private void button1_Click_1(object sender, EventArgs e) { if (textBox1.Text.Trim() == "") { MessageBox.Show("Statement cannot be blank", "Attention"); } else { newone.Statement = textBox1.Text; newone.ProjectId = proid; newone.FeatureId = comboBox1.SelectedIndex; newone.Id = reid; string result = repo.Modify(newone); if (result == "") { this.Close(); } else { MessageBox.Show(newone.Statement, result); } } }