/**
  * @covers Acc_Parm_Code::save
  * @todo   Implement testSave().
  */
 public function testSave()
 {
     global $g_connection;
     $this->object->save();
     $a = new Acc_Parm_Code($g_connection, 'CAISSE');
     $save = clone $a;
     $a->p_code = 'CAISSE';
     $a->p_comment = 'TEST';
     $a->p_value = '5';
     $a->save();
     $test = new Acc_Parm_Code($g_connection, 'CAISSE');
     $this->assertEquals($test->p_code, $a->p_code);
     $this->assertEquals($test->p_comment, $a->p_comment);
     $this->assertEquals($test->p_value, $a->p_value);
     $save->save();
 }
Beispiel #2
0
 */
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
require_once NOALYSS_INCLUDE . '/class_ihidden.php';
require_once NOALYSS_INCLUDE . '/class_acc_parm_code.php';
echo '<div class="content">';
$gDossier = dossier::id();
//-----------------------------------------------------
// confirm mod
if (isset($_POST['confirm_mod'])) {
    extract($_POST);
    $update = new Acc_Parm_Code($cn, $p_code);
    $update->p_comment = $p_comment;
    $update->p_value = $p_value;
    $update->save();
}
$object = new Acc_Parm_Code($cn);
$all = $object->load_all();
echo '<div style="float:left; ">';
echo '<table align="left">';
for ($i = 0; $i < sizeof($all); $i++) {
    echo '<TR>';
    echo $all[$i]->display();
    echo '<TD><FORM method="POST">';
    $w = new IHidden();
    $w->name = 'id';
    $w->value = $i;
    echo $w->input();
    echo HtmlInput::submit('mod', 'modifie');
    echo '</FORM>';