private void GetAllLocalCobranca() { LOCALCOBRANCAColl = LOCALCOBRANCAP.ReadCollectionByParameter(null, "NOME"); DataGriewDados.AutoGenerateColumns = false; DataGriewDados.DataSource = LOCALCOBRANCAColl; lblTotalPesquisa.Text = LOCALCOBRANCAColl.Count.ToString(); }
private void GetDropLocalCobranca() { LOCALCOBRANCAProvider LOCALCOBRANCAP = new LOCALCOBRANCAProvider(); LOCALCOBRANCAColl = LOCALCOBRANCAP.ReadCollectionByParameter(null, "NOME"); cbLocalCobranca.DisplayMember = "NOME"; cbLocalCobranca.ValueMember = "IDLOCALCOBRANCA"; LOCALCOBRANCAEntity LOCALCOBRANCATy = new LOCALCOBRANCAEntity(); LOCALCOBRANCATy.NOME = ConfigMessage.Default.MsgDrop; LOCALCOBRANCATy.IDLOCALCOBRANCA = -1; LOCALCOBRANCAColl.Add(LOCALCOBRANCATy); Phydeaux.Utilities.DynamicComparer <LOCALCOBRANCAEntity> comparer = new Phydeaux.Utilities.DynamicComparer <LOCALCOBRANCAEntity>(cbLocalCobranca.DisplayMember); LOCALCOBRANCAColl.Sort(comparer.Comparer); cbLocalCobranca.DataSource = LOCALCOBRANCAColl; cbLocalCobranca.SelectedIndex = 0; }