Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.66 KB | None | 0 0
  1. function Button1Click($sender, $params)
  2.     {
  3.  
  4.         $preenchidos = array();
  5.         $duplicata = array();
  6.  
  7.         for($i = 1; $i <= 3; $i++){
  8.           $this->debug_to_console($i);
  9.  
  10.           $comboAtual = "ComboBox" . $i;
  11.  
  12.           $comboAtualValor = $this->$comboAtual->ItemIndex;
  13.  
  14.           $this->debug_to_console("valor " . $comboAtualValor);
  15.  
  16.           if(!in_array($comboAtualValor, $preenchidos)){
  17.             array_push($preenchidos, $comboAtualValor);
  18.             $this->$comboAtual->Color = "";
  19.           } else {
  20.             $this->$comboAtual->Color = "red";
  21.             $this->Label1->Caption = "Duplicata";
  22.           }
  23.         }
  24.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement