private void CB_project_MouseClick(object sender, MouseEventArgs e) { if (CB_project.Items.Count > 0) { return; } Expert dbExpert = new Expert(null); Project dbProject = new Project(); string email = this.CB_email.Text; string linkTB = "`projeto_especialista`"; string filter = DBEntity.getJoinFilter(email, Expert.ST.ST_EMAIL, dbExpert, dbProject, linkTB); dbProject.setFilter(filter); this.access.dbProjects = (List <DBEntity>)dbProject.getDataSource(); int nProj = this.access.dbProjects.Count; CB_project.Items.Clear(); for (int i = 0; i < nProj; i++) { if (((Project)this.access.dbProjects[i]).name != "NULL") { CB_project.Items.Add(((Project)this.access.dbProjects[i]).name); } } }
private void CB_email_MouseClick(object sender, MouseEventArgs e) { if (CB_email.Items.Count > 0) { return; } Project project = new Project(); DBEntity dbExpert = new Expert(null); string projName = this.CB_project.Text; string linkTB = "`projeto_especialista`"; string filter = DBEntity.getJoinFilter(projName, Project.ST.ST_NAME, project, dbExpert, linkTB); dbExpert.setFilter(filter); this.access.dbExperts = dbExpert.getDataSource(); int nExperts = this.access.dbExperts.Count; CB_email.Items.Clear(); for (int i = 0; i < nExperts; i++) { if (((Expert)this.access.dbExperts[i]).id != 0) { CB_email.Items.Add(((Expert)this.access.dbExperts[i]).email); } } }