This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string Config_Impressao_Secundaria = ini.IniReadValue("COZINHA", "ATIVO"); | |
if (!string.IsNullOrEmpty(Config_Impressao_Secundaria)) | |
{ | |
if (Config_Impressao_Secundaria == "S") | |
{ | |
DialogResult result_impressao_secundaria = MessageBox.Show("Deseja Imprimir o pedido na Impressora da Cozinha?", "Sistema Integrado de Automação", MessageBoxButtons.YesNo, MessageBoxIcon.Information); | |
if (result_impressao_secundaria == DialogResult.Yes) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `tb_nf_entrada` ( | |
`ID_COMPRA` int(11) NOT NULL AUTO_INCREMENT, | |
`CRT` longtext, | |
`modFrete` int(11) NOT NULL, | |
`indFinal` int(11) NOT NULL, | |
`idDest` int(11) NOT NULL, | |
`indPres` int(11) NOT NULL, | |
`indPag` int(11) NOT NULL, | |
`tpAmb` int(11) NOT NULL, | |
`Fornecedor_Id` int(11) NOT NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int Importar_XML_Arquivo() | |
{ | |
int Retorno = 0; | |
var arquivoXml = Funcoes.BuscarArquivoXml(); | |
if (!string.IsNullOrWhiteSpace(arquivoXml)) | |
{ | |
_nfe = new NFe.Classes.NFe().CarregarDeArquivoXml(arquivoXml); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Script de backup MySQL e MariaDB | |
Introdução | |
Uma das tarefas mais importantes para um administrador de banco de dados é o backup de sua(s) database(s). | |
O objetivo deste post é criar um script de backup que ficará agendado no crontab e executará as rotinas de backup todos os dias as 02:00 a.m. O usuário “backup” só terá privilégios necessários para efetuar o backup. | |
Neste post, é adotado o CentOS 5 como referência. Mas versões mais novas também deverão funcionar sem problemas. | |
Criação e configuração do Usuário ‘backup’ | |
Para criarmos o usuário, precisamos de privilégios administrativos no MySQL. Neste exemplo utilizaremos o usuário root. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dpkg-reconfigure tzdata |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Publicado em 28 de março de 2011 | |
Precisa copiar o esquema do banco de dados (estrutura da tabela) com ou sem os dados da tabela de um banco de dados postgres existente? | |
pg_dump -Cs DB_NAME> / tmp / schema_dump | |
-C switch adiciona as instruções CREATE | |
-s switch especifica dumping apenas o esquema não os dados | |
Se você quiser os dados também, use | |
pg_dump -C DB_NAME> / tmp / schema_dump | |
Se você deseja APENAS os dados e não as instruções CREATE do banco de dados ou da tabela, use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CentOS 7 provides PHP version 5.4 in its official repository | |
Command to install the EPEL repository configuration package: | |
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
Command to install the Remi repository configuration package: | |
yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm | |
Command to install the yum-utils package (for the yum-config-manager command): | |
yum install yum-utils |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From terminal: | |
1: yum install epel* | |
2: yum update / yum upgrade | |
3: Add repo source | |
- CentOS and Red Hat Enterprise Linux 6.x | |
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
sudo rpm -Uvh remi-release-6*.rpm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy (Select * From cidade) To 'C:\Cidades.csv' With CSV DELIMITER ';'; | |
Pass: postgres |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ComboboxItem | |
{ | |
public string Text { get; set; } | |
public object Value { get; set; } | |
public decimal Valor { get; set; } | |
public string Valor_String { get; set; } | |
public int Valor_inteiro { get; set; } | |
public string Descricao { get; set; } | |
public override string ToString() |