コード例 #1
0
        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();
        }
コード例 #2
0
 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.");
     }
 }
コード例 #3
0
        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();
        }