Example #1
0
        private void GetDropRelatorio()
        {
            //13 Consignação
            RowsFiltroCollection RowsFiltro = new RowsFiltroCollection();

            RowsFiltro.Add(new RowsFiltro("IDTELA", "System.Int32", "=", "13"));

            RELATORIOPERSONALIZADOColl = RELATORIOPERSONALIZADOP.ReadCollectionByParameter(RowsFiltro, "NOMERELATORIO");

            cbRelatorio.DisplayMember = "NOMERELATORIO";
            cbRelatorio.ValueMember   = "IDRELATORIOPERSONALIZADO";

            RELATORIOPERSONALIZADOEntity RELATORIOPERSONALIZADOTy = new RELATORIOPERSONALIZADOEntity();

            RELATORIOPERSONALIZADOTy.NOMERELATORIO            = ConfigMessage.Default.MsgDrop;
            RELATORIOPERSONALIZADOTy.IDRELATORIOPERSONALIZADO = -1;
            RELATORIOPERSONALIZADOColl.Add(RELATORIOPERSONALIZADOTy);

            Phydeaux.Utilities.DynamicComparer <RELATORIOPERSONALIZADOEntity> comparer = new Phydeaux.Utilities.DynamicComparer <RELATORIOPERSONALIZADOEntity>(cbRelatorio.DisplayMember);

            RELATORIOPERSONALIZADOColl.Sort(comparer.Comparer);

            cbRelatorio.DataSource    = RELATORIOPERSONALIZADOColl;
            cbRelatorio.SelectedIndex = 0;
        }
Example #2
0
        private static RELATORIOPERSONALIZADOCollection ExecuteReader(ref RELATORIOPERSONALIZADOCollection collection, ref FbDataReader dataReader, FbCommand dbCommand)
        {
            using (dataReader = dbCommand.ExecuteReader())
            {
                collection = new RELATORIOPERSONALIZADOCollection();

                if (dataReader.HasRows)
                {
                    while (dataReader.Read())
                    {
                        collection.Add(FillEntityObject(ref dataReader));
                    }
                }

                if (!(dataReader.IsClosed))
                {
                    dataReader.Close();
                }
                dataReader.Dispose();
            }

            return(collection);
        }