コード例 #1
0
        private void GetDropStatus()
        {
            //11 Pedido de Venda
            RowsFiltro           FiltroProfile = new RowsFiltro("IDGRUPOSTATUS", "System.Int32", "=", "11");
            RowsFiltroCollection Filtro        = new RowsFiltroCollection();

            cbStatus.DisplayMember = "NOME";
            cbStatus.ValueMember   = "IDSTATUS";

            Filtro.Insert(0, FiltroProfile);

            STATUSProvider   STATUSP    = new STATUSProvider();
            STATUSCollection STATUSColl = new STATUSCollection();

            STATUSColl = STATUSP.ReadCollectionByParameter(Filtro);

            STATUSEntity STATUSTy = new STATUSEntity();

            STATUSTy.NOME     = ConfigMessage.Default.MsgDrop;
            STATUSTy.IDSTATUS = -1;
            STATUSColl.Add(STATUSTy);

            Phydeaux.Utilities.DynamicComparer <STATUSEntity> comparer = new Phydeaux.Utilities.DynamicComparer <STATUSEntity>(cbStatus.DisplayMember);

            STATUSColl.Sort(comparer.Comparer);
            cbStatus.DataSource    = STATUSColl;
            cbStatus.SelectedIndex = 0;
        }
コード例 #2
0
        private void GetDropStatus()
        {
            try
            {
                //11 Pedido de Venda
                RowsFiltro           FiltroProfile = new RowsFiltro("IDGRUPOSTATUS", "System.Int32", "=", "11");
                RowsFiltroCollection Filtro        = new RowsFiltroCollection();

                Filtro.Insert(0, FiltroProfile);


                STATUSCollection STATUSColl2 = new STATUSCollection();
                STATUSColl2 = STATUSP.ReadCollectionByParameter(Filtro);

                cbStatus.DisplayMember = "NOME";
                cbStatus.ValueMember   = "IDSTATUS";

                STATUSEntity STATUSTy = new STATUSEntity();
                STATUSTy.NOME     = ConfigMessage.Default.MsgDrop;
                STATUSTy.IDSTATUS = -1;
                STATUSColl2.Add(STATUSTy);

                Phydeaux.Utilities.DynamicComparer <STATUSEntity> comparer = new Phydeaux.Utilities.DynamicComparer <STATUSEntity>(cbStatus.DisplayMember);

                STATUSColl2.Sort(comparer.Comparer);
                cbStatus.DataSource = STATUSColl2;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Erro técnico: " + ex.Message);
            }
        }
コード例 #3
0
        private static STATUSCollection ExecuteReader(ref STATUSCollection collection, ref FbDataReader dataReader, FbCommand dbCommand)
        {
            using (dataReader = dbCommand.ExecuteReader())
            {
                collection = new STATUSCollection();

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

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

            return(collection);
        }