示例#1
0
 private void TxtBuscar_TextChanged(object sender, EventArgs e)
 {
     if (TxtBuscar.Text != "")
     {
         DgvCliente.CurrentCell = null;
         foreach (DataGridViewRow r in DgvCliente.Rows)
         {
             r.Visible = false;
         }
         foreach (DataGridViewRow r in DgvCliente.Rows)
         {
             foreach (DataGridViewCell c in r.Cells)
             {
                 if ((c.Value.ToString().ToUpper()).IndexOf(TxtBuscar.Text.ToUpper()) == 0)
                 {
                     r.Visible = true;
                     break;
                 }
             }
         }
     }
     else
     {
         ClsNCliente objcli = new ClsNCliente();
         DgvCliente.DataSource = objcli.MtdListarTodoCliente();
     }
 }
示例#2
0
        private void BtnListar_Click(object sender, EventArgs e)
        {
            ClsNCliente objcli = new ClsNCliente();

            DgvCliente.DataSource = objcli.MtdListarTodoCliente();
        }
示例#3
0
        public void cargarclientes()
        {
            ClsNCliente objcli = new ClsNCliente();

            DgvCliente.DataSource = objcli.MtdListarTodoCliente();
        }