// this will display the results based on the selections private void SearchItemsBasedOnStatusID() { ScrumQueueLoading dg = new ScrumQueueLoading(); dg.Show(); int selectedStatusID = ((BussinessLogic.StatusType) this.comboBox_Filter.SelectedItem).StatusID; this.ItemList1 = BussinessLogic.Item.GetAllItemsBasedOnStatus(selectedStatusID, this.OpenedProject.ProjectID); this.dataGridView_Items.DataSource = this.ItemList1; this.dataGridView_Items.Columns["ItemID"].HeaderCell.Value = "ID"; this.dataGridView_Items.Columns["CreatedDate"].HeaderCell.Value = "Created On"; this.dataGridView_Items.Columns["CreatedByID"].Visible = false; this.dataGridView_Items.Columns["CreatedByName"].HeaderCell.Value = "Created By"; this.dataGridView_Items.Columns["EditedDate"].HeaderCell.Value = "Edited On"; this.dataGridView_Items.Columns["EditedByID"].Visible = false; this.dataGridView_Items.Columns["EditedByName"].HeaderCell.Value = "Edited By"; this.dataGridView_Items.Columns["StatusID"].Visible = false; this.dataGridView_Items.Columns["StatusName"].HeaderCell.Value = "Status"; this.dataGridView_Items.Columns["ProjectID"].Visible = false; this.dataGridView_Items.Columns["ItemID"].Width = 50; dg.Close(); }
// open existing project private void OpenProject() { ScrumQueueLoading dg = new ScrumQueueLoading(); dg.Show(); UILogic.UIProjectSearch p = new UIProjectSearch(); p.Init(this); dg.Close(); p.ShowDialog(); }
private void filterResultSetBasedOnTextEntered() { ScrumQueueLoading ld = new ScrumQueueLoading(); ld.Show(); int rcount = this.dataGridView_Items.Rows.Count; int ccount = this.dataGridView_Items.Columns.Count; for (int j = 0; j < rcount; j++) { for (int i = 0; i < ccount; i++) { string gridString = this.dataGridView_Items[i, j].Value.ToString().ToLower(); string enteredString = this.textBox_KeyWords.Text.ToLower(); if (gridString.Contains(enteredString) && enteredString.Trim().Length > 0) { this.dataGridView_Items.CurrentCell = null; this.dataGridView_Items.Rows[j].Visible = true; break; } else if (!(gridString.Contains(enteredString)) && enteredString.Trim().Length > 0) { this.dataGridView_Items.CurrentCell = null; this.dataGridView_Items.Rows[j].Visible = false; } else { this.dataGridView_Items.CurrentCell = null; this.dataGridView_Items.Rows[j].Visible = true; } } } ld.Close(); }