protected void btnCem_Click(object sender, EventArgs e) { clienteDAO clientedao = new clienteDAO(); clientedao.InserirClienteCem(); CarregaGridView(); }
private void CarregaGridView() { clienteDAO clientedao = new clienteDAO(); DataTable dtbl = new DataTable(); dtbl = clientedao.ListaTudo(); gvCliente.DataSource = dtbl; gvCliente.DataBind(); }
protected void lnkViewExcluir_Click(object sender, EventArgs e) { if (Convert.ToInt32((sender as LinkButton).CommandArgument) > 0) { clienteDAO clientedao = new clienteDAO(); clientedao.ExcluirCliente(Convert.ToInt32((sender as LinkButton).CommandArgument)); } CarregaGridView(); }