private void FormSelectRequirement_Load(object sender, EventArgs e) { CenterToScreen(); foreach (Feature f in formFeatureRepo.GetAll(selectedProject)) { FeatureSelectionBox.Items.Add(f.Title); } }
public FormCreateRequirement(int projectId) { InitializeComponent(); foreach (Feature feature in featureRepository.GetAll(projectId)) { FeatureComboBox.Items.Add(feature.Title); } currentProjectId = projectId; }
private void FormSelectFeatureToRemove_Load(object sender, EventArgs e) { this.CenterToParent(); FakeFeatureRepository myFeatures = new FakeFeatureRepository(); List <Feature> myList = myFeatures.GetAll(curProjectId); foreach (Feature f in myList) { this.dataGridView1.Rows.Add(f.id.ToString(), f.Title); } }
private void FormCreateRequirement_Load(object sender, EventArgs e) { CenterToScreen(); if (operationType == 1) { Text = "Modify Requirement"; CreateRequirementButton.Text = "Modify Requirement"; label2.Enabled = true; StatementBox.Enabled = true; CreateRequirementButton.Enabled = true; StatementBox.Text = modifyRequirement.Statement; } foreach (Feature f in formFeatureRepo.GetAll(selectedProject)) { FeatureSelectionBox.Items.Add(f.Title); } }
private void FormSelectFeature_Load(object sender, EventArgs e) { this.CenterToParent(); List <Feature> myList = new List <Feature>(); FakeFeatureRepository myFeatures = new FakeFeatureRepository(); myList = myFeatures.GetAll(currentProject); foreach (Feature f in myList) { this.featList.Rows.Add(f.id.ToString(), f.Title); } }
public FormModifyRequirement(int requirementId) { InitializeComponent(); requirement = requirementRepository.GetRequirementById(requirementId); currentlyAttachedFeature = featureRepository.GetFeatureById(requirement.FeatureId); // Gets added as default. foreach (Feature feature in featureRepository.GetAll(requirement.ProjectId)) { FeatureComboBox.Items.Add(feature.Title); } FeatureComboBox.SelectedItem = featureRepository.GetFeatureById(requirement.FeatureId).Title; StatementTextBox.Text = requirement.Statement; }
private void FormModifyRequirement_Load(object sender, EventArgs e) { this.CenterToParent(); List <Feature> myF = F.GetAll(selectedRequirement.ProjectId); this.featsList.Text = F.GetFeatureById(selectedRequirement.FeatureId).Title; this.statBox.Text = R.GetRequirementById(selectedRequirement.id).Statement; this.featsList.Text = F.GetFeatureById(selectedRequirement.FeatureId).Title; foreach (Feature f in myF) { this.featsList.Items.Add(f.Title); } }
private void FormSelectRequirementToModify_Load(object sender, EventArgs e) { this.CenterToParent(); this.label2.Enabled = false; this.reqList.Enabled = false; this.selReq.Enabled = false; this.reqList.ColumnHeadersVisible = false; this.featureList.Items.Add("< Make Selection >"); List <Feature> myList = F.GetAll(currentProject); foreach (Feature f in myList) { this.featureList.Items.Add(f.Title); } }
private void FormCreateRequirement_Load(object sender, EventArgs e) { this.CenterToParent(); List <Feature> features = fake.GetAll(selected_project); comboBox1.SelectedIndex = 0; foreach (Feature f in features) { comboBox1.Items.Add(f.Title); } if (comboBox1.Items.Count < 1) { comboBox1.Enabled = false; } richTextBox1.Enabled = false; btnCreate.Enabled = false; }
private void FormCreateRequirement_Load(object sender, EventArgs e) { this.CenterToParent(); FakeFeatureRepository Features = new FakeFeatureRepository(); List <Feature> myFeatures = new List <Feature>(); myFeatures = Features.GetAll(curProj); this.selFeat.Items.Add("< Make Selection >"); foreach (Feature f in myFeatures) { this.selFeat.Items.Add(f.Title); } this.statMentBox.Enabled = false; this.CrtReq.Enabled = false; }
private void FormRemoveFeature_Load(object sender, EventArgs e) { this.CenterToParent(); FakeFeatureRepository fake = new FakeFeatureRepository(); List <Feature> listfeat = fake.GetAll(_selectProj); dataRemove.ColumnCount = 2; dataRemove.Columns[0].Name = "Id"; dataRemove.Columns[0].Width = 30; dataRemove.Columns[1].Name = "Title"; dataRemove.Columns[1].Width = 620; foreach (Feature f1 in listfeat) { string[] row = { f1.ID.ToString(), f1.Title }; dataRemove.Rows.Add(row); } }
private void FormModifySelectReq_Load_1(object sender, EventArgs e) { this.CenterToParent(); string featTitle; FakeFeatureRepository FakeFeat = new FakeFeatureRepository(); Flist = FakeFeat.GetAll(_SelectedProj); comboBoxFeature.Items.Add("<Make Selection>"); comboBoxFeature.SelectedIndex = 0; foreach (Feature feat in Flist) { featTitle = feat.Title; comboBoxFeature.Items.Add(featTitle); } dataGridReqs.Enabled = false; buttonSelect.Enabled = false; this.comboBoxFeature.SelectedIndexChanged += new System.EventHandler(comboBoxFeat_SelectedIndexChanged); }
public FormSelectFeature(int project_id) { InitializeComponent(); this.CenterToParent(); btnSelect.Enabled = false; selected_id = project_id; fakeFeatureRepository = new FakeFeatureRepository(selected_id); dataGridViewFeatures.ColumnCount = 2; dataGridViewFeatures.Columns[0].Name = "ID"; dataGridViewFeatures.Columns[1].Name = "Title"; List <Feature> tmp = fakeFeatureRepository.GetAll(selected_id); foreach (Feature f in tmp) { int rowid = dataGridViewFeatures.Rows.Add(); DataGridViewRow row = dataGridViewFeatures.Rows[rowid]; row.Cells["ID"].Value = f.Id.ToString(); row.Cells["Title"].Value = f.Title; } }
public FormSelectFeature(int projectId) { DataSet data = new DataSet("FeaturesDataSet"); DataTable dataTable = new DataTable("FeaturesDataTable"); DataRow dataRow; InitializeComponent(); featureList = featureRepository.GetAll(projectId); // Setup the table to insert the features into so we can select from them. DataColumn idDataColumn = new DataColumn(); idDataColumn.DataType = System.Type.GetType("System.Int32"); idDataColumn.ColumnName = "Id"; DataColumn titleDataColumn = new DataColumn(); titleDataColumn.ColumnName = "Feature"; titleDataColumn.DataType = System.Type.GetType("System.String"); dataTable.Columns.Add(idDataColumn); dataTable.Columns.Add(titleDataColumn); foreach (Feature feature in featureList) { // If the project id's match. if (projectId == feature.ProjectId) { // Make a new row, add it. dataRow = dataTable.NewRow(); dataRow["Id"] = feature.Id; dataRow["Feature"] = feature.Title; dataTable.Rows.Add(dataRow); } } dataGridView1.DataSource = dataTable; dataGridView1.MultiSelect = false; dataGridView1.AutoResizeColumns(); dataGridView1.ReadOnly = true; }
private void FormRequirementModify_Load(object sender, EventArgs e) { this.CenterToParent(); List <Feature> features = fake.GetAll(selected_project); Requirement req = fakeRequiremnet.GetRequirementByID(selected_r); richTextBox1.Text = req.Statement; foreach (Feature f in features) { comboBox1.Items.Add(f.Title); if (f.Id == req.FeatureId) { comboBox1.SelectedItem = f.Title; } comboBox1.Items.Add(f.Title); } if (comboBox1.Items.Count < 1) { comboBox1.Enabled = false; } }
private void buttonCreate_Click(object sender, EventArgs e) { FakeRequirementRepository freq1 = new FakeRequirementRepository(); FakeFeatureRepository fake2 = new FakeFeatureRepository(); List <Feature> listFeat1 = new List <Feature>(); Requirement req = new Requirement(); listFeat1 = fake2.GetAll(_selectProj); string s = comboBoxFeature.Text; foreach (Feature ft in listFeat1) { if (ft.Title == s) { __selectFeat = ft.ID; } } req.ID = freq1.GetNextReqID(_selectProj); req.ProjectID = _selectProj; req.FeatureID = __selectFeat; req.Statement = textBoxState.Text.Trim(); string result = freq1.Add(req); if (result == "") { MessageBox.Show("Requirement Added Sucessfully", "", MessageBoxButtons.OK); this.Close(); } else { MessageBox.Show(result, "Attention", MessageBoxButtons.OK); return; } }
private void FormCreateReq_Load(object sender, EventArgs e) { this.CenterToParent(); string isFeat; FakeFeatureRepository fake = new FakeFeatureRepository(); FakeRequirementRepository freq = new FakeRequirementRepository(); List <Feature> listFeat = new List <Feature>(); listFeat = fake.GetAll(_selectProj); textBoxState.Enabled = false; buttonCreate.Enabled = false; comboBoxFeature.Items.Add("<Make Selection>"); comboBoxFeature.SelectedIndex = 0; foreach (Feature f in listFeat) { isFeat = f.Title; comboBoxFeature.Items.Add(isFeat); } this.comboBoxFeature.SelectedIndexChanged += new System.EventHandler(comboBoxFeat_SelectedIndexChanged); }
private void FormSelectFeature_Load(object sender, EventArgs e) { CenterToScreen(); DataTable features = new DataTable("Features"); DataColumn c0 = new DataColumn("ID"); DataColumn c1 = new DataColumn("Feature"); features.Columns.Add(c0); features.Columns.Add(c1); DataRow row; foreach (Feature f in formFeatureRepo.GetAll(selectedProject)) { row = features.NewRow(); row["ID"] = f.Id; row["Feature"] = f.Title; features.Rows.Add(row); } FeatureList.DataSource = features; FeatureList.Columns[1].Width = FeatureList.Width - FeatureList.Columns[0].Width - 43; }