private void VisualizaDetalheVenda_Load(object sender, EventArgs e) { localBanco = ConfigINI.LerINI(@"configuracoes.ini", "[LocalBanco]"); comboLojas.DropDownStyle = ComboBoxStyle.DropDownList; OracleConnection conn1 = new OracleConnection("Data Source=" + localBanco + "/INTEGRACAOSP;User Id=pdvuser;Password=pdv1234;Integrated Security=no"); OracleCommand oCmd1 = new OracleCommand(); string query1 = "SELECT S.LOJA_SAP_PK, " + "s.loja_sap_pk || ' - ' || u.tund_fantasia LOJA," + "s.host_servidor " + "FROM tloja_sap s " + "join TUND_UNIDADE u on s.loja_proton_uk = u.tund_unidade_pk " + "where s.ativa_difusao = 'S' " + "order by 1"; oCmd1.CommandText = query1; oCmd1.CommandType = CommandType.Text; oCmd1.Connection = conn1; conn1.Open(); OracleDataReader ler1 = oCmd1.ExecuteReader(); while (ler1.Read()) { string CENTRO = ler1.GetValue(0).ToString(); string LOJA = ler1.GetValue(1).ToString(); Lojas.Add(LOJA); Centros.Add(CENTRO); } conn1.Close(); comboLojas.DataSource = Lojas; lojasArray = Lojas.ToArray(); centrosArray = Centros.ToArray(); }
private void FormWait_Load(object sender, EventArgs e) { nomedoDominio = ConfigINI.LerINI(@"configuracoes.ini", "[NomeDoDominio]"); timerMensagens.Interval = 3000; timerConectando.Interval = 2000; timerMensagens.Start(); timerConectando.Start(); }
private void FormPai_Load(object sender, EventArgs e) { timerHoraExibicao.Interval = 1000; timerHoraExibicao.Start(); localBanco = ConfigINI.LerINI(@"configuracoes.ini", "[LocalBanco]"); FormCloseButtonDisabler.DisableCloseButton(this.Handle.ToInt32()); lblBemVindo.Text = nome; timer1.Interval = 100; timer1.Start(); }
}//Fim metódo Processamento() private void ConsultaGeral_Load(object sender, EventArgs e) { ////LOG DE ACESSO /////////////////////////////////////////////////////////////////////////////// //FormPai pai = new FormPai(); //string hostname = pai.hostName, usuarioLogado = pai.usuarioLogado; //MessageBox.Show(hostname + " " + usuarioLogado); //OracleConnection conn2 = new OracleConnection("Data Source=10.101.1.32/INTEGRACAOTS;User Id=pdvuser;Password=pdv1234;Integrated Security=no"); //OracleCommand oCmd2 = new OracleCommand(); //string query2 = "INSERT INTO TLOG_VALIDADOR (TLOG_DATA, TLOG_USUARIO, TLOG_HOST, TLOG_OBS) VALUES (:DATAHORA, :USUARIO, :HOST, :OBS)"; //oCmd2.CommandText = query2; //oCmd2.CommandType = CommandType.Text; //oCmd2.Parameters.AddWithValue("DATAHORA", DateTime.Now); //oCmd2.Parameters.AddWithValue("USUARIO", pai.usuarioLogado); //oCmd2.Parameters.AddWithValue("HOST", pai.hostName); //oCmd2.Parameters.AddWithValue("OBS", "Consulta Geral"); //oCmd2.Connection = conn2; //conn2.Open(); //OracleDataReader ler2 = oCmd2.ExecuteReader(); //conn2.Close(); ////////////////////////////////////////////////////////////////////////////////////////////////// localBanco = ConfigINI.LerINI(@"configuracoes.ini", "[LocalBanco]"); OracleConnection conn1 = new OracleConnection("Data Source=" + localBanco + "/INTEGRACAOSP;User Id=pdvuser;Password=pdv1234;Integrated Security=no"); OracleCommand oCmd1 = new OracleCommand(); string query1 = "SELECT S.LOJA_SAP_PK, " + "s.loja_sap_pk || ' - ' || u.tund_fantasia LOJA," + "s.host_servidor " + "FROM tloja_sap s " + "join TUND_UNIDADE u on s.loja_proton_uk = u.tund_unidade_pk " + "where s.ativa_difusao = 'S' " + "order by 1"; oCmd1.CommandText = query1; oCmd1.CommandType = CommandType.Text; oCmd1.Connection = conn1; conn1.Open(); OracleDataReader ler1 = oCmd1.ExecuteReader(); while (ler1.Read()) { string LOJA = ler1.GetValue(1).ToString(); Lojas.Add(LOJA); string CENTRO = ler1.GetValue(0).ToString(); Centros.Add(CENTRO); } conn1.Close(); lojasArray = Lojas.ToArray(); centrosArray = Centros.ToArray(); }
private void ConsultaPorUF_Load(object sender, EventArgs e) { localBanco = ConfigINI.LerINI(@"configuracoes.ini", "[LocalBanco]"); comboBox1.DropDownStyle = ComboBoxStyle.DropDownList; comboUF.DropDownStyle = ComboBoxStyle.DropDownList; OracleConnection conn1 = new OracleConnection("Data Source=" + localBanco + "/INTEGRACAOSP;User Id=pdvuser;Password=pdv1234;Integrated Security=no"); OracleCommand oCmd1 = new OracleCommand(); string query1 = "select distinct " + "c.tloc_uf_fk, " + "c.tloc_uf_fk || ' - ' || f.tloc_nome as UF " + "from " + "tund_unidade u " + "join tloc_cidade_cep c on u.tund_cidade_cep_fk = c.tloc_cidade_cep_pk " + "join tloja_sap s on u.tund_unidade_pk = s.loja_proton_uk " + "join tloc_uf f on c.tloc_uf_fk = f.tloc_uf_pk " + "AND s.ativa_difusao = 'S' " + "and s.loja_sap_pk not like ('9%') " + "order by 1"; oCmd1.CommandText = query1; oCmd1.CommandType = CommandType.Text; oCmd1.Connection = conn1; conn1.Open(); OracleDataReader ler1 = oCmd1.ExecuteReader(); while (ler1.Read()) { string UF = ler1.GetValue(0).ToString(); string ESTADO = ler1.GetValue(1).ToString(); Uf.Add(UF); Estados.Add(ESTADO); } conn1.Close(); comboUF.DataSource = Estados; UfArray = Uf.ToArray(); EstadoArray = Estados.ToArray(); }
void ConsultaRecarga() { localBanco = ConfigINI.LerINI(@"configuracoes.ini", "[LocalBanco]"); comboLoja.DropDownStyle = ComboBoxStyle.DropDownList; OracleConnection conn1 = new OracleConnection("Data Source=" + localBanco + "/INTEGRACAOSP;User Id=pdvuser;Password=pdv1234;Integrated Security=no"); OracleCommand oCmd1 = new OracleCommand(); string query1 = "select sp.loja_sap_pk, " + "s.codlojasitef, " + "s.idt_terminal, " + "s.data_trn, " + "case when s.estado_trn = '2' " + "then 'PENDENTE' " + "when s.estado_trn = '4' " + "then 'EFETUADA PDV' " + "when s.estado_trn = '132' " + "then 'EFETUADA LOCAL' " + "end " + "as ESTADO, " + "s.cuponfiscal, " + "s.valor_trn/100 as VALOR, " + "s.nsu_sitef as NSU_SITEF, " + "s.nome_filial as OPERADORA, " + "'(' || s.area || ')' || s.telefone as TELEFONE " + "from logrecargacel@banco_sitef s " + "join tloja_proton_sitef l " + "on s.codlojasitef = '00000' || l.loja_sitef " + "join tloja_sap sp " + "on l.loja_proton = sp.loja_proton_uk " + "where s.estado_trn in (2, 4, 132) " + "and s.codigo_resp = '00' " + "and s.data_trn between '" + maskedDataIni.Text.Substring(6, 4) + maskedDataIni.Text.Substring(3, 2) + maskedDataIni.Text.Substring(0, 2) + "' and '" + maskedDataFim.Text.Substring(6, 4) + maskedDataFim.Text.Substring(3, 2) + maskedDataFim.Text.Substring(0, 2) + "' " + "and s.codlojasitef <> 'GRP_3024' " + "and not exists (select " + "* " + "from ttransacao t " + "join tloja_proton_sitef l " + "on t.numero_loja_uk = l.loja_proton " + "where t.nsu_servico = s.nsu_sitef " + "and to_char(trunc(t.data_hora_transacao_uk), " + "'YYYYMMDD') = s.data_trn " + "and '00000' || l.loja_sitef = s.codlojasitef " + "and t.tipo = 'R')"; oCmd1.CommandText = query1; oCmd1.CommandType = CommandType.Text; oCmd1.Connection = conn1; conn1.Open(); OracleDataReader ler1 = oCmd1.ExecuteReader(); while (ler1.Read()) { ListaRecarga.Add(new ServicosRecarga() { LojaSAP = ler1.GetValue(0).ToString(), LojaSiTef = ler1.GetValue(1).ToString(), PDVSiTef = ler1.GetValue(2).ToString(), Data = ler1.GetValue(3).ToString(), Estado = ler1.GetValue(4).ToString(), Cupom = ler1.GetValue(5).ToString(), Valor = ler1.GetValue(6).ToString(), NSU = ler1.GetValue(7).ToString(), Operadora = ler1.GetValue(8).ToString(), Telefone = ler1.GetValue(9).ToString() }); } conn1.Close(); }
void ConsultaFatura() { localBanco = ConfigINI.LerINI(@"configuracoes.ini", "[LocalBanco]"); comboLoja.DropDownStyle = ComboBoxStyle.DropDownList; OracleConnection conn1 = new OracleConnection("Data Source=" + localBanco + "/INTEGRACAOSP;User Id=pdvuser;Password=pdv1234;Integrated Security=no"); OracleCommand oCmd1 = new OracleCommand(); string query1 = "select sp.loja_sap_pk as LOJA, " + "s.codlojasitef, " + "s.idt_terminal as PDV, " + "s.ipterminal, " + "s.data_trn as DATA, " + "case when s.estado_trn = '2' " + "then 'PENDENTE' " + "when s.estado_trn = '4' " + "then 'EFETUADA PDV' " + "when s.estado_trn = '132' " + "then 'EFETUADA LOCAL' " + "end " + "as ESTADO, " + "s.cuponfiscal, " + "s.VALOR_TRN/100 AS VALOR, " + "s.nsu_sitef as NSU_SITEF " + "from logtef@banco_sitef s " + "join tloja_proton_sitef l " + "on s.codlojasitef = '00000' || l.loja_sitef " + "join tloja_sap sp " + "on l.loja_proton = sp.loja_proton_uk " + "where s.data_trn between '" + maskedDataIni.Text.Substring(6, 4) + maskedDataIni.Text.Substring(3, 2) + maskedDataIni.Text.Substring(0, 2) + "' and '" + maskedDataFim.Text.Substring(6, 4) + maskedDataFim.Text.Substring(3, 2) + maskedDataFim.Text.Substring(0, 2) + "' " + "and s.idt_rede = '247' " + "and s.cdmodoentrada <> '-1' " + "and s.idt_produto = '-1' " + "and s.estado_trn not in ('1', '3', '5', '6', '134') " + "and s.codigo_resp = '00' " + "and not exists (select * " + "from ttransacao t " + "join tloja_proton_sitef l " + "on t.numero_loja_uk = l.loja_proton " + "where t.nsu_servico = s.nsu_sitef " + "and trunc(t.data_hora_transacao_uk) between '" + maskedDataIni.Text.Substring(0, 2) + maskedDataIni.Text.Substring(3, 2) + maskedDataIni.Text.Substring(6, 4) + "' and '" + maskedDataFim.Text.Substring(0, 2) + maskedDataFim.Text.Substring(3, 2) + maskedDataFim.Text.Substring(6, 4) + "' " + "and '00000' || l.loja_sitef = s.codlojasitef " + "and t.tipo = 'SR') "; oCmd1.CommandText = query1; oCmd1.CommandType = CommandType.Text; oCmd1.Connection = conn1; conn1.Open(); OracleDataReader ler1 = oCmd1.ExecuteReader(); while (ler1.Read()) { ListaFatura.Add(new ServicosFatura() { LojaSAP = ler1.GetValue(0).ToString(), LojaSiTef = ler1.GetValue(1).ToString(), PDVSiTef = ler1.GetValue(2).ToString(), IP = ler1.GetValue(3).ToString(), Data = ler1.GetValue(4).ToString(), Estado = ler1.GetValue(5).ToString(), Cupom = ler1.GetValue(6).ToString(), Valor = ler1.GetValue(7).ToString(), NSU = ler1.GetValue(8).ToString() }); } conn1.Close(); }
private void FormLogin_Load(object sender, EventArgs e) { nomedoDominio = ConfigINI.LerINI(@"configuracoes.ini", "[NomeDoDominio]"); localBanco = ConfigINI.LerINI(@"configuracoes.ini", "[LocalBanco]"); FormCloseButtonDisabler.DisableCloseButton(this.Handle.ToInt32()); }