Esempio n. 1
0
        private void GetDropStatus()
        {
            try
            {
                STATUSTLMKProvider   STATUSTLMKP    = new STATUSTLMKProvider();
                STATUSTLMKCollection STATUSTLMKColl = new STATUSTLMKCollection();
                STATUSTLMKColl = STATUSTLMKP.ReadCollectionByParameter(null, "NOME");

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

                STATUSTLMKEntity STATUSTLMKTy = new STATUSTLMKEntity();
                STATUSTLMKTy.NOME         = ConfigMessage.Default.MsgDrop;
                STATUSTLMKTy.IDSTATUSTLMK = -1;
                STATUSTLMKColl.Add(STATUSTLMKTy);

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

                STATUSTLMKColl.Sort(comparer.Comparer);
                cbStatus.DataSource = STATUSTLMKColl;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Erro técnico: " + ex.Message);
            }
        }
Esempio n. 2
0
        private void GetAllStatus()
        {
            CreaterCursor Cr = new CreaterCursor();

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

            try
            {
                STATUSTLMKColl = STATUSTLMKP.ReadCollectionByParameter(null);
                DataGriewDados.AutoGenerateColumns = false;
                DataGriewDados.DataSource          = STATUSTLMKColl;

                lblTotalPesquisa.Text = STATUSTLMKColl.Count.ToString();

                PaintGrid();

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;
                MessageBox.Show("Erro técnico: " + ex.Message);
            }
        }