private void SetSefiEchipe() { ManagerPersoana m = null; try { m = new ManagerPersoana(); sefi = m.GetPersoaneIMO("", "", "sefechipa", cmbFirme.Text == "Toate firmele" ? "ALL" : cmbFirme.Text, false, true); sefi.Add(new PersoanaIMO("Toti sefi echipa")); cmbSefiEchipa.DataSource = sefi; cmbSefiEchipa.DisplayMember = "NumeComplet"; cmbSefiEchipa.Text = "Toti sefi echipa"; } finally { m = null; } }
private void searchTextBox1_Search(object sender, EventArgs e) { ManagerPersoana m = new ManagerPersoana(); IList<PersoanaIMO> persoane = null; try { SetFilterColor(); persoane = m.GetPersoaneIMO(stxtNume.Text,stxtPrenume.Text, cmbFunctii.Text == "Toate functiile" ? "ALL" : cmbFunctii.Text, cmbFirme.Text == "Toate firmele" ? "ALL" : cmbFirme.Text, ckAnulate.Checked,rbOrdoneazaNume.Checked); bindingSource1.DataSource = persoane; PopuleazaTotal(persoane); grdPersoane.Update(); bindingSource1_PositionChanged(this, null); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { m = null; } }