protected void GridView_Cuidadores_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        String respuesta;

        try {
            int         index = Convert.ToInt32(e.CommandArgument);
            GridViewRow row   = GridView_Cuidadores.Rows[index];

            if (e.CommandName == "Editar")
            {
                datosCuidadores obj = new datosCuidadores()
                {
                    Id            = row.Cells[0].Text,
                    Nombre        = row.Cells[1].Text,
                    Apellidos     = row.Cells[2].Text,
                    Nacionalidad  = row.Cells[3].Text,
                    Telefono      = row.Cells[4].Text,
                    Estatus       = row.Cells[5].Text,
                    Fecha_ingreso = row.Cells[6].Text
                };

                Session["DataCuidadores"] = obj;
                Response.Redirect("cuidadores_insertar-actualizar.aspx");
            }
            else if (e.CommandName == "Eliminar")
            {
                dynamic myObject = new ExpandoObject();
                myObject.id = Convert.ToInt32(row.Cells[0].Text);
                string json = JsonConvert.SerializeObject(myObject);

                respuesta = client.eliminarCuidadores("[" + json + "]");

                if (respuesta.Equals("1"))
                {
                    Response.Redirect("cuidadores.aspx");
                }
                else
                {
                    Response.Write("<script language=javascript> alert('" + respuesta + "'); </script>");
                }
            }
        } catch (Exception ex) {
            Response.Write("<script language=javascript> alert('" + ex.Message + "'); </script>");
        }
    }