private void loadGrid()
        {
            NegocioPersonal negAuto = new NegocioPersonal();
            grvpersonal.DataSource = negAuto.ObtenerPersonal();
            grvpersonal.DataBind();

        }
        protected void btneliminar_Click(object sender, EventArgs e)
        {
            int id = Convert.ToInt16(drlpersonal.SelectedValue);
            NegocioPersonal negauto = new NegocioPersonal();

            if (negauto.BorrarPersonal(id) > 0)
            {
                loadGrid();
                loadDropList();
                clean();
                string script = @"<script type='text/javascript'>
                alert ('Colaborador  Eliminado');
                </script>";
                ScriptManager.RegisterStartupScript(this, typeof(Page), "ProyectoArquitecturaWeb", script, false);
                //MessageBox.Show("Auto Eliminado");
            }

        }
        protected void btnalmacenar_Click(object sender, EventArgs e)
        {
            NegocioPersonal negPersonal = new NegocioPersonal();
            //si es mayor a cero registro
            // if (negAuto.AltaAuto(txtmarca.Text, decimal.Parse(txtprecio.Text)) > 0, txtvendido.Text)
            if (negPersonal.InsertarPersonal(txtcedula.Text,txtnombre.Text,txtapellido.Text,txttelefono.Text,txtemail.Text, int.Parse(txtarea.Text)) > 0)
            {
                //agregar referencia a System.Windows.Forms
                loadGrid();
                loadDropList();
                clean();
                string script = @"<script type='text/javascript'>
                alert ('Colaborador registrado');
                </script>";
                ScriptManager.RegisterStartupScript(this, typeof(Page), "ProyectoArquitecturaWeb", script, false);
                //MessageBox.Show("Auto Insertado");

            }
        }
        protected void btnmodificar_Click(object sender, EventArgs e)
        {
            int id = Convert.ToInt16(drlpersonal.SelectedValue);
            //int x = drlautos.SelectedIndex;
            //lblprecio.Text = Convert.ToString(drlautos.SelectedIndex);

            NegocioPersonal negAuto = new NegocioPersonal();



            if (negAuto.ActualizarPersonal(id, txtcedula.Text, txtnombre.Text, txtapellido.Text, txttelefono.Text, txtemail.Text, int.Parse(txtarea.Text)) > 0)
            {
                loadGrid();
                loadDropList();
                clean();
                string script = @"<script type='text/javascript'>
                alert ('Colaborador Modificado');
                </script>";
                ScriptManager.RegisterStartupScript(this, typeof(Page), "AgenciaAutos1", script, false);
                //MessageBox.Show("Auto Modificado");
            }

        }