private void FormConfiguration_Load(object sender, EventArgs e) { OpSQLlite conn = new OpSQLlite(); if (conn.ExistConf()) { textBoxOriginDoc.Text = conn.Getconfiguration(2); textBoxTimeSAP.Text = conn.Getconfiguration(3); textBoxFieldKey.Text = conn.Getconfiguration(4); textBoxQueueName.Text = conn.Getconfiguration(1); textBoxTimeStart.Text = conn.Getconfiguration(5); textBoxTimeEnd.Text = conn.Getconfiguration(6); if (textBoxTimeStart.Text is null) { checkBox1.Checked = false; } else { textBoxTimeEnd.Text = ""; } //if (String.Compare(conn.Getconfiguration(7)., "false")) //{ // checkImport.Checked = false; //} //else //{ // checkImport.Checked = true; //} } conn.CloseConnection(); }
private void button4_Click(object sender, EventArgs e) { OpSQLlite conn = new OpSQLlite(); conn.CreateConfiguration(textBoxQueueName.Text, textBoxOriginDoc.Text, System.Convert.ToInt32(textBoxTimeSAP.Text), textBoxFieldKey.Text, textBoxTimeStart.Text, textBoxTimeEnd.Text, checkImport.Checked ); }
private void connect() { //clsConectionSAP conn = new clsConectionSAP(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text); //textBox9.Text = conn.ConnStatus; //if(conn.RetCode != 0) //{ OpSQLlite sql = new OpSQLlite(); //} }
private void Sync_Load(object sender, EventArgs e) { notifyIcon1.BalloonTipText = "Application minimized"; notifyIcon1.BalloonTipTitle = "Liber B1 Sync"; //verificar se há conexao OpSQLlite sQLlite = new OpSQLlite(); //verifica se existe connexao connSAPLiber = new Connection(); //if (!connSAPLiber.hasConn) if (!sQLlite.ExistConn()) { button1.Enabled = false; button2.Enabled = false; toolStripStatusLabel3.BackColor = Color.Red; toolStripStatusLabel3.Text = "Sem Conexão."; label1TimeSAP.Text = "Temporizador não configurado"; label1.Text = ""; label2.Text = ""; label3.Text = ""; } else { toolStripStatusLabel3.BackColor = Color.Green; toolStripStatusLabel3.Text = "Conectado."; //verifica se existe configuração cfg = new Configuration(); if (sQLlite.ExistConf()) { if (cfg.TimeSAP < 2) { timer1.Enabled = false; } else { timer1.Interval = cfg.TimeSAP * 60 * 1000; } timer1.Start(); DateTime otherDate = DateTime.Now.AddMilliseconds(cfg.TimeSAP * 60 * 1000); label1TimeSAP.Text = otherDate.ToLongTimeString(); DateTime otherDate2 = DateTime.Now.AddMilliseconds(10 * 60 * 1000); label3.Text = otherDate2.ToLongTimeString(); MyLogger.Log("------------------------------------------------------------------------------------------------"); MyLogger.Log("Aguardando novas iterações..."); } else { label1TimeSAP.Text = "Temporizador não configurado"; label3.Text = ""; } } }
private void button4_Click(object sender, EventArgs e) { OpSQLlite conn = new OpSQLlite(); conn.CreateConfiguration(textBoxQueueName.Text, textBoxOriginDoc.Text, System.Convert.ToInt32(textBoxTimeSAP.Text), textBoxFieldKey.Text, textBoxTimeStart.Text, textBoxTimeEnd.Text, checkImport.Checked ); MessageBox.Show("Reinicie a aplicação para aplicar as modificações"); }
private void button4_Click(object sender, EventArgs e) { if (labelConnLiber.ForeColor == Color.Green && labelConnSAP.ForeColor == Color.Green) //if (labelConnLiber.ForeColor == Color.Green || labelConnSAP.ForeColor == Color.Green) //somente para testes - apagar linha quando estiver em producao { OpSQLlite conn = new OpSQLlite(); conn.CreateConnection(textBoxServerName.Text, textBoxDBName.Text, textBoxDBID.Text, textBoxDBPass.Text, textBoxSAPUser.Text, textBoxSAPPass.Text, textBoxLiberEnd.Text, textBoxLiberUser.Text, textBoxPassLiber.Text, textBoxLiberPort.Text, comboBox1.Text); conn.CloseConnection(); } else { MessageBox.Show("Teste as Conexões SAP e Liber antes de Salvar."); } }
private void Form1_Load(object sender, EventArgs e) { OpSQLlite conn = new OpSQLlite(); if (conn.ExistConn()) { String key = "trugLk"; textBoxServerName.Text = conn.Getconnection(0); textBoxDBName.Text = conn.Getconnection(1); textBoxDBID.Text = conn.Getconnection(2); textBoxDBPass.Text = Cryptography.Decrypt(conn.Getconnection(3), key); textBoxSAPUser.Text = conn.Getconnection(4); textBoxSAPPass.Text = Cryptography.Decrypt(conn.Getconnection(5), key); textBoxLiberEnd.Text = conn.Getconnection(6); textBoxLiberUser.Text = conn.Getconnection(7); textBoxPassLiber.Text = Cryptography.Decrypt(conn.Getconnection(8), key); textBoxLiberPort.Text = conn.Getconnection(10); } conn.CloseConnection(); }