public static function getInstance() { if (!isset(self::$instance)) { self::$instance = new self(); } return self::$instance; }
public function FornFindChar() { $request = knl_lib_Registry::getRequestObj(); $str_parte = $request->getGet('nome'); $cotacao_cli = knl_extensions_cadastronf_cotDao::getInstance()->selectByParteNome($str_parte); $vl = knl_view_Loader::getInstance(); $vl->setVar("cotacao_cli", $cotacao_cli); $vl->display("cadastronf/CotVwAjx", true, true); }
public function gravaNoBanco() { $request = knl_lib_Registry::getRequestObj(); $CotacaoCli = knl_extensions_cadastronf_cotDao::getInstance(); $mCotacaoCli = $CotacaoCli->selectByNome($request->getpost('razao')); if (count($mCotacaoCli) == 0) { $mCotacaoCli[0] = new knl_extensions_cadastronf_cotModel(0, $request->getpost('razao')); $CotacaoCli->upsert($mCotacaoCli[0]); } return $mCotacaoCli[0]; }
public function getFullData($param) { $arrModel = array(); $arrModel["d_cotacao_forn"] = knl_extensions_cadastronf_cotDao::getInstance()->selectById($param->get_id_fornecedor()); return $arrModel; }