当前位置: 首页>>代码示例>>PHP>>正文


PHP Question::ask方法代码示例

本文整理汇总了PHP中Question::ask方法的典型用法代码示例。如果您正苦于以下问题:PHP Question::ask方法的具体用法?PHP Question::ask怎么用?PHP Question::ask使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Question的用法示例。


在下文中一共展示了Question::ask方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Question

 function xmoney_close_clicked()
 {
     $dialog = new Question($this->Owner, 'Sair do X-Money?');
     $result = $dialog->ask();
     if ($result != Gtk::RESPONSE_YES) {
         return;
     }
     Gtk::main_quit();
 }
开发者ID:eneiasramos,项目名称:xmoney,代码行数:9,代码来源:notebook.php

示例2: Question

 function delete_event()
 {
     $dialog = new Question($this->Owner, 'Sair do X-Money?');
     $result = $dialog->ask();
     if ($result == Gtk::RESPONSE_YES) {
         exit(0);
     } else {
         return true;
     }
 }
开发者ID:eneiasramos,项目名称:xmoney,代码行数:10,代码来源:janela_principal.php

示例3: Question

 function excluir_clicked()
 {
     if (!$this->grid->pega_dados()) {
         return;
     }
     $id = $this->grid->Valores[0];
     $dialog = new Question($this->Owner, ' Deseja mesmo remover o produto selecionado? ');
     $result = $dialog->ask();
     if ($result != Gtk::RESPONSE_YES) {
         return;
     }
     $db = new Database($this, false);
     if (!$db->link) {
         return;
     }
     $sql = 'DELETE FROM Tb_Produtos WHERE Cod_S_Produto = ' . $id;
     if (!$db->query($sql)) {
         return;
     }
     $this->pega_dados();
     new Message($this->Owner, 'Produto removido com sucesso!');
 }
开发者ID:eneiasramos,项目名称:xmoney,代码行数:22,代码来源:cad_produtos.php

示例4: Question

 function excluir_clicked()
 {
     if (!$this->grid->pega_dados()) {
         return;
     }
     $id = $this->grid->Valores[0];
     $dialog = new Question($this->Owner, latin1(' Deseja mesmo remover o endereço selecionado ? '));
     $resp = $dialog->ask();
     if ($resp != Gtk::RESPONSE_YES) {
         return;
     }
     $sql = ' DELETE FROM Tb_End_Fornecedores WHERE Cod_S_Endereco = ' . $id;
     $db = new Database($this->Owner, false);
     if (!$db->link) {
         return;
     }
     if (!$db->query($sql)) {
         return;
     }
     $this->pega_dados();
     new Message($this->Owner, 'Endereco for fornecedor removido com sucesso!');
 }
开发者ID:eneiasramos,项目名称:xmoney,代码行数:22,代码来源:end_fornecedores.php

示例5: Question

 function excluir_clicked()
 {
     if (!$this->grid->pega_dados()) {
         return;
     }
     $id = $this->grid->Valores[0];
     $dialog = new Question($this->Owner, latin1('Deseja mesmo remover a unidade de venda selecionada?'));
     $result = $dialog->ask();
     if ($result != Gtk::RESPONSE_YES) {
         return;
     }
     $db = new Database($this->Owner, false);
     if (!$db->link) {
         return;
     }
     $sql = 'DELETE FROM Tb_Unid_Vendas WHERE Cod_S_Unidade = ' . $id;
     if (!$db->query($sql)) {
         return;
     }
     $this->pega_dados();
     new Message($this->Owner, 'Unidade de venda removida com sucesso!');
 }
开发者ID:eneiasramos,项目名称:xmoney,代码行数:22,代码来源:cad_unid_vendas.php

示例6: Question

 function excluir_clicked()
 {
     if (!$this->grid->pega_dados()) {
         return;
     }
     $id = $this->grid->Valores[0];
     $dialog = new Question($this->Owner, ' Deseja mesmo remover a transportadora selecionada? ');
     $resp = $dialog->ask();
     if ($resp != Gtk::RESPONSE_YES) {
         return;
     }
     $db = new Database($this->Owner, false);
     if (!$db->link) {
         return;
     }
     $sql = ' DELETE FROM Tb_Transportadoras WHERE Cod_S_Trans = ' . $id;
     if (!$db->query($sql)) {
         return;
     }
     $this->pega_dados();
     new Message($this->Owner, 'Transportadora removida com sucesso!');
 }
开发者ID:eneiasramos,项目名称:xmoney,代码行数:22,代码来源:cad_transportadoras.php

示例7: createPost

function createPost()
{
    //take input here
    global $db;
    $q = new Question();
    echo "Enter the title of Question\n";
    $q->context = trim(fgets(STDIN));
    echo "Enter the statement of Question\n";
    $q->statement = trim(fgets(STDIN));
    if ($q->ask($db)) {
        echo "\n Question has been posted successfully\n";
    } else {
        echo "\n Try again :(\n ";
    }
}
开发者ID:hassan-maqsood,项目名称:hassanmaqsood-repo,代码行数:15,代码来源:simulator.php

示例8: Question

 function excluir_clicked()
 {
     if ($this->grid->pega_dados()) {
         $question = new Question($this, 'Deseja remover o produto selecionado?');
         if ($question->ask() == Gtk::RESPONSE_YES) {
             $db = new Database($this);
             if (!$db->conexao) {
                 return;
             }
             $query = 'UPDATE Tb_Produtos SET Inativo = 1 WHERE Cod_S_Pro = ' . $this->grid->Valores[0];
             if ($db->run('sistema', $query)) {
             }
             $this->pega_dados();
         }
     }
 }
开发者ID:eneiasramos,项目名称:xmoney,代码行数:16,代码来源:lista_precos.php


注:本文中的Question::ask方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。