private void CreateProject() { try { bool rs = blc.ManageProduct(0, txtpname.Text, Convert.ToDateTime(dtpstart.Text), Convert.ToDateTime(dtpend.Text), txtdescription.Text, 1); if (rs == true) { DialogResult dr = MessageBox.Show("Do you want to add new project information?", "Add the new project", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dr == DialogResult.Yes) { MessageBox.Show("Project Successfully Added"); } dgvprojectdetails.DataSource = pc.GetAllProjects(); HelperClass.makefields(dtpstart); txtpname.Focus(); } else { MessageBox.Show("Error in Adding Project"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
//retrieve the data on DataGridView private void bugsolution_Load(object sender, EventArgs e) { dgvbugsolutions.DataSource = bsc.GetAllBugSolutions(); cmbproject.DataSource = pc.GetAllProjects(); cmbproject.DisplayMember = "ProjectName"; cmbproject.ValueMember = "ProjectName"; cmbproject.SelectedIndex = -1; }
private void CreateProject() { //try catch exception try { bool res = blc.ProjectTable(0, txtprojectname.Text, Convert.ToDateTime(dtpstartingdate.Text), Convert.ToDateTime(dtpfinishingdate.Text), txtdescription.Text, 1); if (res == true) { //display message as added project MessageBox.Show("Add to Create Project"); dgvprojects.DataSource = pc.GetAllProjects(); HelperClass.makeFieldsBlank(grpContainer); } else { //display error message as data cannot be added MessageBox.Show("Couldn't Add selected Project"); dgvprojects.DataSource = pc.GetAllProjects(); HelperClass.makeFieldsBlank(grpContainer); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void BugForm_Load(object sender, EventArgs e) { cmbproject.DataSource = pc.GetAllProjects(); cmbproject.DisplayMember = "ProjectName"; cmbproject.ValueMember = "ProjectId"; cmbproject.SelectedIndex = -1; cmbidentifiedby.DataSource = uc.GetAllUsers(); cmbidentifiedby.DisplayMember = "UserName"; cmbidentifiedby.ValueMember = "UserId"; cmbidentifiedby.SelectedIndex = -1; }
private void Bugbyproduct_Load(object sender, EventArgs e) { try { cmbprojectname.DataSource = pc.GetAllProjects(); cmbprojectname.DisplayMember = "ProjectName"; cmbprojectname.ValueMember = "ProjectId"; cmbprojectname.SelectedIndex = -1; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void solutionform_Load(object sender, EventArgs e) { cmbproject.DataSource = pc.GetAllProjects(); cmbproject.DisplayMember = "ProjectName"; cmbproject.ValueMember = "ProjectId"; cmbproject.SelectedIndex = -1; cmbbugid.DataSource = bc.GetAllBugs(); cmbbugid.DisplayMember = "BugName"; cmbbugid.ValueMember = "BugId"; cmbbugid.SelectedIndex = -1; cmbsolvedby.DataSource = uc.GetAllUsers(); cmbsolvedby.DisplayMember = "UserName"; cmbsolvedby.ValueMember = "UserId"; cmbsolvedby.SelectedIndex = -1; }