Esempio n. 1
0
 //Expande e Diminui o Controle
 private void BtnExpandir_Click(object sender, EventArgs e)
 {
     //Diminui o controle
     if (this.Height == Altura)
     {
         this.Height = 33; btnExpandir.Text = "+";
     }
     //Expande o controle
     else
     {
         this.Height = Altura; btnExpandir.Text = "-"; DataGridBoletas.ClearSelection();
     }
 }
Esempio n. 2
0
        private void BtnExcluir_Click(object sender, EventArgs e)
        {
            if (DataGridBoletas.SelectedRows.Count != 1)
            {
                MessageBox.Show("Favor Selecionar um Registro");
                return;
            }
            else
            {
                DataGridBoletas.Rows.RemoveAt(DataGridBoletas.SelectedRows[0].Index);
            }

            DataGridBoletas.ClearSelection();
        }
Esempio n. 3
0
        public void RefreshData()
        {
            Altura = 55;

            //Limpa DataGrid
            DataGridBoletas.Rows.Clear();

            if (Ordem.BOLETAS == null || Ordem.BOLETAS.Count == 0)
            {
                Ordem.Deletar(Ordem.IDORDEM); PainelControle.Controls.Remove(this);
            }

            foreach (BL_Boleta B in Ordem.BOLETAS)
            {
                string status = B.STATUS;
                //if (B.STATUS.Length >= 12)
                //    status = B.STATUS.Substring(0, 12);
                DataGridBoletas.Rows.Add(new string[] { B.IDBOLETA.ToString(), B.CODCOT.ToString(), B.CPFCNPJ.ToString(), B.NOME, B.FUNDO.ToString(), B.OPERACAO, B.VALOR.ToString(), B.CONTA, status });
                Altura += 21;
            }

            //Limita a Altura Maxima do controle
            if (Altura > 200)
            {
                Altura = 200;
            }

            DataGridBoletas.ClearSelection();

            LabelID.Text = "ID: " + Ordem.IDORDEM;

            LabelDe.Text     = Ordem.ASSUNTO;
            LabelHora.Text   = Ordem.HORARIO.ToString("hh:mm");
            LabelStatus.Text = Ordem.STATUS;

            if (Ordem.ASSUNTO.Length > 45)
            {
                LabelDe.Text = LabelDe.Text.Substring(0, 45);
            }
            ;

            AtualizarStatusControle();
        }
Esempio n. 4
0
 private void DataGridBoletas_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     DataGridBoletas.ClearSelection();
 }