private void FormModifyReq_Load(object sender, EventArgs e) { this.CenterToParent(); FakeFeatureRepository Fake1 = new FakeFeatureRepository(); FakeRequirementRepository Freq1 = new FakeRequirementRepository(); List <Feature> feats = new List <Feature>(); Requirement req = new Requirement(); req = Freq1.GetRequirementByID(_RequirementID); feats = Fake1.GetAll(_ProjectID); int index = 0; foreach (Feature feat in feats) { comboBoxFeature.Items.Add(feat.Title); if (feat.ID == _FeatureID) { comboBoxFeature.SelectedIndex = index; } index++; } textBoxState.Text = req.Statement.ToString(); this.comboBoxFeature.SelectedIndexChanged += new System.EventHandler(comboBoxFeat_SelectedIndexChanged); }
public FormRemoveFeature(string projectname) { InitializeComponent(); pname = projectname; this.CenterToParent(); foreach (Project p in FakeProjectRepository._Projects) { if (p.Name == pname) { id = p.Id; } } List <Feature> list = new List <Feature>(); list = feat.GetAll(id); dataGridView1.DataSource = list; }
private void ModifyFeature_Load(object sender, EventArgs e) { foreach (Project p in FakeProjectRepository._Projects) { if (newname == p.Name) { id = p.Id; } } List <Feature> featlist = new List <Feature>(); featlist = newfeat.GetAll(id); grid.DataSource = featlist; Feature select = (Feature)grid.CurrentRow.DataBoundItem; selected = select.Id; }