Ejemplo n.º 1
0
        private void GetDropVendedor()
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            try
            {
                FUNCIONARIOProvider   FUNCIONARIOP    = new FUNCIONARIOProvider();
                FUNCIONARIOCollection FUNCIONARIOColl = new FUNCIONARIOCollection();
                FUNCIONARIOColl = FUNCIONARIOP.ReadCollectionByParameter(null, "NOME");

                cbVendedor.DisplayMember = "NOME";
                cbVendedor.ValueMember   = "IDFUNCIONARIO";

                FUNCIONARIOEntity FUNCIONARIOTy = new FUNCIONARIOEntity();
                FUNCIONARIOTy.NOME          = ConfigMessage.Default.MsgDrop;
                FUNCIONARIOTy.IDFUNCIONARIO = -1;
                FUNCIONARIOColl.Add(FUNCIONARIOTy);

                Phydeaux.Utilities.DynamicComparer <FUNCIONARIOEntity> comparer = new Phydeaux.Utilities.DynamicComparer <FUNCIONARIOEntity>(cbVendedor.DisplayMember);

                FUNCIONARIOColl.Sort(comparer.Comparer);
                cbVendedor.DataSource = FUNCIONARIOColl;

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;
                MessageBox.Show("Erro técnico: " + ex.Message);
            }
        }
Ejemplo n.º 2
0
        private void GetFuncionario()
        {
            try
            {
                FUNCIONARIOProvider   FUNCIONARIOP    = new FUNCIONARIOProvider();
                FUNCIONARIOCollection FUNCIONARIOColl = new FUNCIONARIOCollection();
                FUNCIONARIOColl = FUNCIONARIOP.ReadCollectionByParameter(null, "NOME");

                cbFuncionario.DisplayMember = "NOME";
                cbFuncionario.ValueMember   = "IDFUNCIONARIO";

                FUNCIONARIOEntity FUNCIONARIOTy = new FUNCIONARIOEntity();
                FUNCIONARIOTy.NOME          = ConfigMessage.Default.MsgDrop;
                FUNCIONARIOTy.IDFUNCIONARIO = -1;
                FUNCIONARIOColl.Add(FUNCIONARIOTy);

                Phydeaux.Utilities.DynamicComparer <FUNCIONARIOEntity> comparer = new Phydeaux.Utilities.DynamicComparer <FUNCIONARIOEntity>(cbFuncionario.DisplayMember);

                FUNCIONARIOColl.Sort(comparer.Comparer);
                cbFuncionario.DataSource = FUNCIONARIOColl;

                cbFuncionario.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Erro técnico: " + ex.Message);
            }
        }
Ejemplo n.º 3
0
        private void GetDropFuncionario()
        {
            FUNCIONARIOProvider   FUNCIONARIOP    = new FUNCIONARIOProvider();
            FUNCIONARIOCollection FuncionarioColl = FUNCIONARIOP.ReadCollectionByParameter(null, "NOME");

            cbFuncionario.DisplayMember = "NOME";
            cbFuncionario.ValueMember   = "IDFUNCIONARIO";

            FUNCIONARIOEntity FUNCIONARIOTy = new FUNCIONARIOEntity();

            FUNCIONARIOTy.NOME          = ConfigMessage.Default.MsgDrop;
            FUNCIONARIOTy.IDFUNCIONARIO = -1;
            FuncionarioColl.Add(FUNCIONARIOTy);

            Phydeaux.Utilities.DynamicComparer <FUNCIONARIOEntity> comparer = new Phydeaux.Utilities.DynamicComparer <FUNCIONARIOEntity>(cbFuncionario.DisplayMember);

            FuncionarioColl.Sort(comparer.Comparer);

            cbFuncionario.DataSource = FuncionarioColl;
        }