private void fillCells(String nameQueryS, String cfQueryS) { int indexRow = 0;//just to know at which row we must write this.Patients.Rows.Clear(); //for each patient, for each visit, write information for (int i = 0; i < ps.Count; i++) { Patient thisP = ps[i]; String thisName = thisP.getName() + " " + thisP.getSurname(); String thisCf = thisP.getCF(); //MessageBox.Show("thisName: |" + thisName + "| vs |" + nameQueryS + "|" ); if (cfQueryS.ToUpper() == thisCf.ToUpper() || strContains(nameQueryS.ToUpper(), thisName.ToUpper()) || strContains(thisName.ToUpper(), nameQueryS.ToUpper()) || (nameQueryS == "" && cfQueryS == "")) { this.Patients.Rows.Add();//add a row this.Patients.Rows[indexRow].Cells[1].Value = thisP.getId(); this.Patients.Rows[indexRow].Cells[2].Value = thisName; this.Patients.Rows[indexRow].Cells[3].Value = thisCf; indexRow++; } } }
private void fillPatient() { nameText.Text = thisP.getName(); surnameText.Text = thisP.getSurname(); dateText.Text = thisP.getDate(); sexText.Text = thisP.getSex(); }
private void fillCommons() { if (thisP != null)//if the patient is already existent { String thisName = thisP.getName(); nameText.Text = thisName; String thisSurname = thisP.getSurname(); surnameText.Text = thisSurname; String thisDate = thisP.getDate(); dateText.Text = thisDate; String thisSex = thisP.getSex(); sexText.Text = thisSex; String thisNotes = thisP.getNotes(); notesText.Text = thisNotes; } }