Esempio n. 1
0
        //private void txtFiltro_TextChanged(object sender, EventArgs e)
        //{
        //    bool contem=false;
        //    string[] filtros = txtFiltro.Text.Trim().Split(' ');
        //    foreach (DataGridViewRow itemR in dgvProc.Rows)
        //    {
        //        foreach (var filtro in filtros)
        //        {
        //            contem = false;
        //            foreach (DataGridViewCell itemC in itemR.Cells)
        //            {
        //                if (itemC.OwningColumn.Visible)
        //                {
        //                    if (itemC.Value.ToString().Contains(filtro))
        //                    {
        //                        contem = true;
        //                        break;
        //                    }
        //                    if (contem) break;
        //                }
        //            }
        //        }
        //        itemR.Visible = contem;
        //    }
        //}

        public override void Novo(object sender, EventArgs e)
        {
            try
            {
                base.Novo(sender, e);
                frmCadConfiguracao lfrmCad = new frmCadConfiguracao();
                lfrmCad.Carregar(this);
            }
            catch (Exception ex)
            {
                WinControls.ApresentarErro(AssistErroException.TratarErro(ex));
            }
        }
Esempio n. 2
0
 private void dgvProc_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.RowIndex >= 0)
         {
             frmCadConfiguracao lfrmCad = new frmCadConfiguracao();
             lfrmCad.Carregar(int.Parse(dgvProc.Rows[e.RowIndex].Cells[colId.Index].Value.ToString()), this);
         }
     }
     catch (Exception ex)
     {
         WinControls.ApresentarErro(AssistErroException.TratarErro(ex));
     }
 }