private void FormModifyFeatureTitle_Load(object sender, EventArgs e) { this.CenterToParent(); FakeFeatureRepository fake = new FakeFeatureRepository(); Feature f1 = fake.GetFeatureByID(_selectId); modifyTextbox.Text = f1.Title; }
private void FormModifyFeature_Load(object sender, EventArgs e) { this.CenterToScreen(); FakeFeature = new FakeFeatureRepository(_SelectedProjectId); selectedFeauture = FakeFeature.GetFeatureByID(featureID); textBoxTitle.Text = selectedFeauture.Title; temporaryFeature = new Feature(); }
private void selectButton_Click(object sender, EventArgs e) { if (dataRemove.SelectedCells.Count < 0) { MessageBox.Show("A must be selected.", "Attention"); } else { _selectID = dataRemove.SelectedCells[0].RowIndex; DataGridViewRow selectedRow = dataRemove.Rows[_selectID]; int sID = Convert.ToInt32(selectedRow.Cells["ID"].Value); _selectID = sID; FakeFeatureRepository fake1 = new FakeFeatureRepository(); Feature f2 = fake1.GetFeatureByID(_selectID); FakeRequirementRepository req = new FakeRequirementRepository(); DialogResult result = MessageBox.Show("Are you sure you want to Remove:" + f2.Title, "Confirmation", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { DialogResult result2 = MessageBox.Show("There are Requirements associated with this Feature.\n" + "These Requirements will also be deleted.", "Confirmation", MessageBoxButtons.YesNo); if (result2 == DialogResult.Yes) { string res = fake1.Remove(f2); req.RemoveByFeatureID(_selectID); } else { MessageBox.Show("Remove Canceled", "Attention", MessageBoxButtons.OK); } this.Close(); } else { MessageBox.Show("Remove Canceled", "Attention", MessageBoxButtons.OK); } } }